Index

PopoverTool

MMO.editor · 1 symbol · generated 30 Sep 2026

class

PopoverTool

Tool.js:228

A tool whose button opens a panel under it (a colour grid, a link form, a table menu ...).

class MMO.editor.PopoverTool extends MMO.editor.Tool
Namespace
MMO.editor
Extends
Tool
`renderPopover()` builds the panel each time it opens; a choice made in it calls `editor.exec(this, ...)`, then the editor closes it. While it is open, the selection the text had is kept by the editor, so a panel may hold an input that takes the focus.

Index

onClick(editor, button)
renderPopover(editor)
createItem(content, onclick, attrs)A button of the panel, which does not take the focus away from the text either.

Methods3

onClick(editor, button)

Tool.js:229
onClick(editor, button)
editor
button

renderPopover(editor)

Tool.js:237
renderPopover(editor)
editorHTMLElement
returnsArray<Node> | Nodethe panel's content

createItem(content, onclick, attrs)

Tool.js:248

A button of the panel, which does not take the focus away from the text either.

createItem(content, onclick, attrs = {})
contentstring | Node
onclickFunction
attrs = {}Objectmore attributes
returnsHTMLButtonElement