Index

Image

MMO.editor.tools · 1 symbol · generated 30 Sep 2026

class

Image

Image.js:11

Insert an image: a file from the computer, or an address.

class MMO.editor.tools.Image extends MMO.editor.PopoverTool
Namespace
MMO.editor.tools
Extends
PopoverTool
A file is sent to the editor's `upload-url` when it has one (```<mmo-editor>`'s `insertFiles()`), and embedded in the html otherwise. Pasting or dropping an image does the same, without the tool. Clicking an image of the text opens the tool on it, to change its description or its width.

Methods3

renderPopover(editor)

Image.js:12
renderPopover(editor)
editor

apply(editor, src, alt, image, width)

Image.js:55
apply(editor, src, alt = '', image = null, width = null)
editorHTMLElement
src?stringthe address; null removes image
alt = ''stringthe description
image = null?HTMLImageElementthe image to change, null to insert a new one
width = null?stringa css width, '' for the image's own; null leaves it as it is