Get Started
Plugins
Macros
More information

Typograf

Description

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.

Supported languages are listed here.

Plugin type: visual, non-system.

Supported editors: documents.

Typograf
Installation

Available by default in ONLYOFFICE Enterprise Edition and Community Edition (Document Server + Community Server).

You can also download this plugin from the ONLYOFFICE App Directory and install it following the desktop or cloud installation instructions.

Usage
  1. Open the Plugins tab and press Typograf.
  2. Click on Show Advanced Settings. Choose the locale and the rules you want to apply to your text.
  3. Select the text you want to correct.
  4. Run the plugin with the Correct text button.
Known issues
  • When using the plugin in a document abstract with graphic objects, these objects (images, shapes, Text Arts, Text Boxes, tables, charts) are lost along with the text they contained.
  • If you select the text inside a graphic object, the text will be removed from the object and inserted into the document in a corrected form.
  • Graphic formulas are converted to strings.
  • Drop caps, content controls, hyperlinks, underlays, footnotes, bookmarks, caption, tables of contents are removed.
  • If at least a part of the text is split into columns, then the columns will be applied to the entire document.
  • Breaks are not saved
  • Changes suggested using Track Changes are not saved.
  • If the plugin is used with the Track Changes mode on, the corrected text will be inserted as a suggested change.
  • Comments are not saved, except for the comments to the whole document.
  • Headers and footers remain unchanged if the entire document is selected.
  • If header/footer content is selected, the graphic objects it contained will be lost.
  • Line numbering is saved if it is applied to the entire document. If it is applied to a section, then it will be lost along with the section.
  • When two or more paragraphs have been selected, an empty paragraph will be added after the corrected text.
Plugin structure

Repository on GitHub: https://github.com/ONLYOFFICE/plugin-typograf.

  1. config.json, index.html and code.js
  2. Icons
  3. Third-party services:
    • jQuery - a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development (https://jquery.com). License: MIT License.
    • Select2 gives you a customizable select box with support for searching, tagging, remote data sets, infinite scrolling, and many other highly used options (https://select2.org/). License: MIT.
    • Typograf - screen typography for typesetting text (https://github.com/typograf/typograf). License: MIT License.
Config
{
    "name": "Typograf",
    "nameLocale": {
        "ru": "Типограф",
        "fr": "Typograf",
        "es": "Typograf",
        "de": "Typograf"
    },
    "guid": "asc.{55159EC6-C91A-4DDB-8E1E-558454666461}",

    "variations": [
        {
            "description": "Typograf",
            "descriptionLocale": {
                "ru": "Типограф",
                "fr": "Typograf",
                "es": "Typograf",
                "de": "Typograf"
            },
            "url": "index.html",

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

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

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

            "isUpdateOleOnResize": false,

            "buttons": [],

            "initOnSelectionChanged": true
        }
    ]
}
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.