I need to insert custom html to editor component.
I would like to add custom button which triggers popup with text area. Entered text should then be inserted where current focus is inside <code> tag.
As I see it, this can be done in 2 ways:
- add another editor command insertHtml (current are bold, insertUnorderedList, createLink, insertFile, ... , fontSize, setHTML)
This would probably required more time, but would support practically any html code in editor.
- add support for <code> tag to format command (currently supported are: p, blockquote, h1-h6)
This would required a lot less time to implement then the first suggestion, but it adds only one feature to editor.
This feature would be enough for me.
All information was copied from docs.