Version 2.0

What it does

This plugin is used to properly apply inline formats to the active selection.

Installation

First you have to switch into your project location using the command line.

cd path/to/your/project

Then you can install the plugin as follows:

npm install @xeditor/plugin-inlineformat --save --registry https://npm.xeditor.com:4873

Configuration

The demo configuration of the plugin looks like this:

{
    pluginId: 'inlineformat',
    ptype: 'uxxeditorinlineformat',
    inlineFormatTypes: ['bold', 'italic', 'underline', 'subscript', 'superscript']
}

API

The API for the plugin can be found here: inlineformat plugin API

Buttons

This plugin exports the following button templates that can be used in your toolbar configuration:

Button Action
button:xeditor.inlineformat Applies defined element to current selection

Changelog

v2.0.0

Major Changes

  • Changed toolbarType to type
  • Changed to new way toolbar buttons are updated
  • Adapted usage to new Class Ext.ux.xeditor.Range
  • Adpated usages of updated method getPlainTextLength as no more psaces are added automatically and therefore the result has changed
  • Added function onTriggerFormat to trigger an inline format using a shortcut

Changes

  • updateToolbarState will now no longer update the toolbar when the selection offset has changed, since this doesn't affect which buttons are enabled (performance gain)

Bugfixes

  • Added Bugfix to not get errors in overflow menu if button contains custom attributes.