Skip to content

Version 1.0

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-changeelementlevel --save --registry https://npm.xeditor.com:4873

Configuration

The demo configuration of the plugin looks like this:

{
    pluginId: 'changeelementlevel',
    ptype: 'uxxeditorchangeelementlevel',
    enableContextMenu: true,
    elements: [{
        moveElementType: 'chapter',
        checkElementType: 'heading'
    }]
}

This configuration results in the following:

  • when a heading element is selected, the indent and outdent button will be enabled (if possible, outdent action is not enabled if selected element is already on first level)
  • as enableContextMenu config is set to true, corresponding entries will be added to the context menu
  • triggering the acton will indent/outdent the chapter element selected heading belongs to

The plugin also adds additional button templates, which can be used in your toolbar configuration.

API

The API can be found here: Change element level Plugin 1.0

Buttons

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

Name Action
button:xeditor.indent Indents currectly selected list item
button:xeditor.outdent Removes indent of currently selected list item

Changelog

v1.0.2

Changes

  • adjusted checkIndentOutdentEnabled to enable indent/outdent also if selection is within removed content but element to be moved is not removed

v1.0.1

Bugfixes

  • Bugfix for the button event listener to prevent the logic during text input.

Changes

  • Added the .npmrc file with the xeditor npm repository### v1.0.0

v1.0.0

  • Initial release