Hi! I wanna develop my own plugin for document server (text editor).
I couldn’t find comprehensive documentation for this, so I researched your plugin examples. I found an error in one of them.
This plugin should search and color the text. He copes with the search, but there are problems with coloring. I found out that coloring does not occur because RGB is passed to the SetHighlight function. But the logic of this function only works if you pass the names of the colors (“red”, “green”, “black”, “blue”, etc.). Although there is another code that is not executed. But, I couldn’t figure out what it was doing because it was encrypted. I would like you to fix this error and explain to me where I could get more complete documentation (which would talk about functions like SetHighlight, setStyle, etc.)
Hi @giome3c
By default, the SetHighlight method for a Paragraph (Range) object sets the color from predefined templates:
Available highlight colors can be found at ONLYOFFICE Api Documentation - Simple types.
These colors include: “black”, “blue”, “cyan”, “green”, “magenta”, “red”, “yellow”, “white”, “darkBlue”, “darkCyan”, “darkGreen”, “darkMagenta”, “darkRed”, “darkYellow”, “darkGray”, “lightGray”, and “none”.
We’ve taken note of the suggestion for RGB support in the SetHighlight method for future releases.
Once implemented, we’ll inform you.
For more detailed documentation on methods, visit https://api.onlyoffice.com/docbuilder/basic.
You can easily search for the method you’re interested in.
Additionally, you can find the structure description for each editor:
1 Like
Thank you very much! I think this is exactly what I needed!
1 Like