Since document.execCommand is deprecated, what is the plan for future releases? #2214
-
As you probably know that What is your plan for replacement of this function? Do you have any current recommendations for inlinetool developments? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello @FarooqAlaulddin
In the future we would like to have some robust interface provided by Editor.js API for inline tools, however that is really challenging problem as it requires to disabled default browser behaviour and fully simulate it with more modern APIs. So as for now, |
Beta Was this translation helpful? Give feedback.
-
Another advantage of execCommand is that it can be used at any position within any element without causing too much confusion. |
Beta Was this translation helpful? Give feedback.
Hello @FarooqAlaulddin
execCommand
is deprecated for quite a while, however there is still no suitable alternative. The same results might be achieved using Range API and Input Events Level 2 API. However, Range API implementation differs from browser to browser, and Input Events are not widely supported yet.In the future we would like to have some robust interface provided by Editor.js API for inline tools, however that is really challenging problem as it requires to disabled default browser behaviour and fully simulate it with more modern APIs. So as for now,
execCommand
is a way to go