Plugin samples
The following examples will show you how to create and use ONLYOFFICE plugins to add specific features to the editors that are not directly related to the OOXML format.
Add comment in cell
Adds comments to a cell of the spreadsheet.
Add custom fields
Inserts custom fields into the document.
Autocomplete
Helps the user to input text quickly.
Chess
Inserts a Chess Board object into the document editor. The object makes it possible to edit and save the chess position in the FEN format.
Clippy
Adds a clippy assistant to the document editor.
Context menu and events
Tracks the events of calling the context menu and clicking on its items. It also tracks the cursor position changes.
Count words and characters
Counts paragraphs, words, and characters with or without spaces in the selected part of the document.
Extended comments
Pastes, edits, and removes comments and replies (with user data) in a document.
Get and paste html
Gets the document content as HTML code, modifies it, and pastes back to the document.
Hello world
Inserts the Hello world! phrase when the user presses the button.
Highlight code
Connects the highlight.js library for highlighting code syntax with the necessary language, style, and background color.
Invoices
Inserts template fields for invoice information.
Language tool
Connects the LanguageTool assistant, multilingual grammar, and style checker to check the text for grammar, style, and spell errors.
Load custom fields
Loads custom fields from the document.
Move cursor
Moves the text cursor to the document start/end.
OCR
Connects the TesseractJS-Core library for extracting text from an image (.png .jpg) and inserting it into the document. OCR supports more than 60 languages.
Photo editor
Connects the Toast UI Image Editor for editing images right in the document: cropping, resizing, applying effects, etc.
Search and change text background color
Searches for target text and changes its background color.
Search and replace on start
Searches for and replaces text in the document when it is reopened.
Search and replace
Searches for target text and replaces it with something else.
Settings
Protects a document using a watermark.
Speech
Converts the selected text into speech. The plugin uses guessLanguage to recognize the language and the SpeechSynthesis interface of the Web Speech API.
Symbol table
Inserts special symbols into the document.
Telegram
Connects the Telegram application for instant messaging within the ONLYOFFICE editors.
Templates
Inserts document templates generated by the Document Builder script.
Thesaurus
Connects Big Huge Thesaurus to search for word synonyms and antonyms.
Translator
Connects the Google Translate API for translating the selected text into other languages.
Typograf
Connects the Typograf assistant to prepare text for publishing by correcting typographical errors. It helps automatically place non-breaking spaces, remove extra spaces, correct minor typos, insert correct quotes, replace hyphens with dashes, and much more.
Work with content controls content
Inserts the content of one content control into another.
Work with content controls navigation
Inserts content controls (automatically or manually), navigates and selects them as well as pastes text into them.
Work with content controls tags
Gets the list of content controls tags.
YouTube
Connects youtube iframe\api for embedding YouTube videos into documents as OLE objects and managing them by adjusting their size, rotating, and changing position.
Zotero
Connects a Zotero account for adding references to the document in full accordance with the chosen style guides.