Hi,
I need to insert single characters programmatically into an editor (use case symbol selector for special characters).
Using the insertHTML API I can insert the right character, but the character/string is inserted outside the existing text-span's in the editor.
Same result when using the 'paste' API.
Since the character is *not* inserted inside the span of the existing text, it will be using the default formatting, and not the formatting of the text next to it.
Example: "ABC" is entered into the editor, the font-size is set to a non-default size. If a character is inserted using insertHTML or paste after the "ABC", it will be using the default font-size, not the size of the text next to it.
Is there a way to insert a character or string into the current text-span so formatting can be preserved ?
Thanks.
I need to insert single characters programmatically into an editor (use case symbol selector for special characters).
Using the insertHTML API I can insert the right character, but the character/string is inserted outside the existing text-span's in the editor.
Same result when using the 'paste' API.
Since the character is *not* inserted inside the span of the existing text, it will be using the default formatting, and not the formatting of the text next to it.
Example: "ABC" is entered into the editor, the font-size is set to a non-default size. If a character is inserted using insertHTML or paste after the "ABC", it will be using the default font-size, not the size of the text next to it.
Is there a way to insert a character or string into the current text-span so formatting can be preserved ?
Thanks.