Get Started
Plugins
Macros
More information

Search and change text background color

Description

Searches for target text and changes its background color.

Plugin type: visual, non-system.

Supported editors: documents.

SearchAndChangeTextBackgroundColor
Installation

Download this plugin from GitHub and install it following the desktop, on-premises, or cloud installation instructions.

Usage
  1. Open the Plugins tab and press Example search and change background text.
  2. Enter the required text in the field.
  3. Choose the necessary color in the color block.
  4. Press the Color button to change the background color for the selected text.
  5. Press the Color all button to change the background color for all the found results.
  6. Press the Reset button to reset the background color for the selected text.
Plugin structure

Repository on GitHub: https://github.com/ONLYOFFICE/sdkjs-plugins/tree/develop/example_search_and_change_text_background_color.

  1. config.json, index.html and code.js
  2. Icons
Config
{
    "name" : "Example search and change background text",
    "guid" : "asc.{EF5735E0-69A7-4D4A-9ABE-F58FD70F488J}",

    "variations" : [
        {
            "description" : "Example search and change background text",
            "url"         : "index.html",

            "icons"           : ["resources/img/icon.png", "resources/img/icon@2x.png", "resources/img/icon2.png", "resources/img/icon2@2x.png"],
            "isViewer"        : false,
            "EditorsSupport"  : ["word"],

            "isVisual"        : true,
            "isModal"         : false,
            "isInsideMode"    : true,

            "initDataType"    : "",
            "initData"        : "",

            "isUpdateOleOnResize" : false,

            "buttons"         : []
        }
    ]
}
Methods and events

The main plugin code is located here.

Support

If you want to request a feature or report a bug regarding this plugin, use the issues section on GitHub.