Try the fastest and simplest way to install ONLYOFFICE

How apply current style when inserting text?

Integration questions/issues

How apply current style when inserting text?

Postby mmeyer » Mon Apr 16, 2018 3:22 pm

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
mmeyer
 
Posts: 9
Joined: Fri Feb 23, 2018 8:21 am

Re: How apply current style when inserting text?

Postby Maxim » Thu Apr 19, 2018 11:44 am

Hello!
Maybe this will help you
Maxim
 
Posts: 1737
Joined: Tue Oct 11, 2016 2:34 pm


Return to Plugins

Who is online

Users browsing this forum: No registered users and 1 guest