Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto-applied inline tools in Editor.js

For a large project I am currently looking into the capabilities of https://editorjs.io/. The documentation is very helpful but I can't find information about the following question. Is there a way to auto-convert user input at the time of writing without using the inline toolbar but rather by listening to the user input. Let me give you a few examples to make things clearer:

  • auto-link a URL at the time it is entered
  • support user mentions triggered by starting input with a @ character
  • support hashtag autocompletion triggered by starting a word with a # character
  • support emoji selection triggered by starting a word with a : character

I do not want to add an inline tool to provide a button to trigger those use cases. I want to automatically apply / trigger them while the user is creating input.

Any help is appreciated.

like image 842
Fynn Avatar asked Apr 07 '26 23:04

Fynn


1 Answers

No, there is currently no way to do so. You would need to listen for changes and overwrite the buffer. I have a similar problem and I haven't been able to found a cleaner way.

like image 130
adlr0 Avatar answered Apr 09 '26 13:04

adlr0