Skip to main content

Image

Plugin alias: image

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

Enables inserting and editing images via a dialog with fields for source URL, alt text, dimensions, and optionally an advanced tab for border/spacing/CSS styles. Supports image upload, image lists, class selection, and caption wrapping via <figure>.

Options

OptionTypeDefaultDescription
image_dimensionsbooleantrueShow width/height fields.
image_advtabbooleanfalseShow Advanced tab.
image_uploadtabbooleantrueShow Upload tab.
image_prepend_urlstring''URL prefix for image sources.
image_class_listobject[]CSS classes in dropdown.
image_descriptionbooleantrueShow alt text field.
image_titlebooleanfalseShow title field.
image_captionbooleanfalseShow caption checkbox.
image_listfalse/string/object[]/functionfalsePredefined image list.

Commands

CommandDescription
editor42ImageOpens insert/edit image dialog.

Toolbar buttons

NameTypeDescription
imageToggle buttonActive when image is selected.
NameDescription
imageInsert/edit image.

Also registers a context menu entry on images.