Hello to every body, in the application I use, I have to allow to the user to insert automatically some codes in the text they're writing. For what I've seen, the only way to do this is to use the insertHtml function. Problem is, if I try to paste those codes inside formatted text, the editor automagically break the format in 2, and insert my text in the middle, so that fonts and styles are not applied to it.
i.e. if I wanted to insert a code between Header1 and Header2 in the following row
<h1>Header1 Header2</h1>
it would become
<h1Header1</h1>mycode<h1>Header2</h2>
with obvious ugly results.
As the automatic insert feature was introduced to help the user reduce time-consuming operations, asking them to re-format everything after inserting the codes would make the feature quite pointless.
There's a way to avoid this effect?
If not, even some pointer to where i should operate to write a dedicated plugin would be enough.
i.e. if I wanted to insert a code between Header1 and Header2 in the following row
<h1>Header1 Header2</h1>
it would become
<h1Header1</h1>mycode<h1>Header2</h2>
with obvious ugly results.
As the automatic insert feature was introduced to help the user reduce time-consuming operations, asking them to re-format everything after inserting the codes would make the feature quite pointless.
There's a way to avoid this effect?
If not, even some pointer to where i should operate to write a dedicated plugin would be enough.