Aloha Editor

Aloha Editor Guides

These guides help you to make your content editable and to develop Aloha Editor.

List Enforcer Plugin

The List Enforcer Plugin ensures that in an editable is exactly one top-level list. No other content is allowed.

1 Overview

Given an editable which has been configured to enforce lists, ensures that there is exactly one top-level list in the editable.

  • If there are no lists, one will be added, using the placeHolderListString.
  • If there is more than one list, they will be merged into the first list.
  • If there is any other content in the editable it will be removed.

2 Usage

Enable the plugin and define where you just want lists — this is done with defining jQuery selectors at Aloha.settings.plugins.listenforcer.editables.

3 Components

  • No components in the floating menu or sidebar.

4 Configuration

The List Enforcer plugin provides the following configuration options:


Aloha.settings.plugins: {
	listenforcer: {
		editables: [ '.aloha-enforce-lists', '#list-container' ]
	}
};