fvilers/tiny-editor

Do you have a way of dynamically creating tiny editors in js?

Closed this issue · 3 comments

This should at least be documented

Sorry for the late reply. To create a new editor, you declare a

with the data attribute data-tiny-editor. There's currently no exposed method to initialize an editor from javascript. Do you need to feature ?

Version 0.3.0 expose a global method (window.__tinyEditor.transformToEditor()) to transform any element (usually a

) to an editor.

that works I can migrate to the npm version later.. I also ended up adding Caret util to my project to support getting and setting the carrot position from tiny editors Could this be worth including in the core. Ill make another issue