wysihtml5
wysihtml5 copied to clipboard
Where in the code does the revert back to normal text after h1, h2?
I basically replaced the insertImage function with my own as I had to accommodate a in-place uploading feature, with a <figure>
and <img>
tag.
I do this by
editor.composer.commands.exec("formatBlock", "figure");
editor.composer.commands.exec("insertHTML", insertFigureString);
However I find myself unable to revert back to normal text, as I press enter after (or in, or anywhere about) the <figure>
tag, it would just create another <figure>
tag, just like how <p>
is created (I have set useLineBreaks to false.)
The behaviour I want it to do is that of H1 or any other header tags do. After you do a single line of such block element and press enter, you revert back to the normal text mode.
I guess somewhere in the code <figure>
needs to be included along with h1, h2, so I lurked thru the code the other day and tried to accommodate above idea in every place h1 exists, but it does not seem to work!
Or there may be a much simpler way of doing this (this hits my nerve).
If there is, or if there is another place I should look at, please let me know.
Many Thanks drophere
Long shot but... ever find an answer to this?