Page 1 of 1

How apply current style when inserting text?

PostPosted: Mon Apr 16, 2018 3:22 pm
by mmeyer
I am using the following command to insert text from a plugin:
Code: Select all
window.Asc.plugin.executeMethod("PasteHtml", ["test"]);


Current behaviour:
The inserted text gets formatted with the style that is selected in the top right section of the editor (Normal, Heading 1, Heading 2, ...)

Needed behaviour:
I need the inserted text to be formatted with whatever style the user selected in the editor (e.g. style "Heading 1" but with a red font and bold)
Inserting the text from the plugin should behave exactly as if the user just typed the text in to the editor directly.

Is this possible? (With PasteHtml or some alternative solution)

Regards,
M. Meyer

Re: How apply current style when inserting text?

PostPosted: Thu Apr 19, 2018 11:44 am
by Maxim
Hello!
Maybe this will help you