Skip to main content

Lists

Plugin alias: lists

editor42.init({
plugins: 'lists'
});

Provides full support for ordered lists (<ol>), unordered lists (<ul>), and definition lists (<dl>). Includes toggling list type, indenting/outdenting via Tab/Shift+Tab, backspace/delete behavior within lists, and a list properties dialog for configuring ordered list start values.

Options

OptionTypeDefaultDescription
lists_indent_on_tabbooleantrueWhether Tab indents and Shift+Tab outdents list items.

Commands

CommandDescription
InsertUnorderedListToggle unordered list.
InsertOrderedListToggle ordered list.
InsertDefinitionListToggle definition list.
RemoveListRemove list formatting.
editor42ListPropsOpen List Properties dialog.
editor42ListUpdateUpdate current list attributes/styles.

Toolbar buttons

NameTypeDescription
numlistToggle buttonToggle ordered list (only if advlist is not loaded).
bullistToggle buttonToggle unordered list (only if advlist is not loaded).
NameDescription
listpropsList properties (enabled inside <ol>).

Events

EventDescription
ListMutationFired after a list action. Payload: { action, element } where action is ToggleUlList, ToggleOlList, ToggleDLList, IndentList, or OutdentList.

API

MethodDescription
backspaceDelete(isForward)Programmatic backspace/delete within lists.

Also registers a lists context menu that shows list properties inside ordered lists.