Breakhelper
What it does
This plugin can be used for creating basic return handling. It can determine which element should be inserted after return was hit on a certain element.
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-breakhelper --save --registry https://npm.xeditor.com:4873
Configuration
The default configuration of the plugin looks like this:
{
pluginId: 'breakhelper',
ptype: 'uxxeditorbreakhelper',
helpers: [{
levels: [1],
checkTypes: ['_mathmlcontainer', 'med_image', 'med_video'],
actionType: 'insert',
insertType: 'text'
}, {
levels: [1],
checkTypes: ['heading', 'subheading', 'tab_table'],
actionType: 'insert',
insertType: 'p'
}]
}
This results into the following:
- when return is hit in either _mathmlcontainer, med_image or med_video element, a new text node will be inserted
- when return is hit in either heading, subheading or tab_table element, a new p element will be inserted
API
The API for the plugin can be found here