Skip to content
  1. Extras
  2. mxEditorJs
  3. Getting started
  4. System settings

System settings ​

Prefix mxeditorjs., namespace mxeditorjs.

Where to change: Settings → System settings, filter by mxeditorjs.

Quick reference ​

SettingPurposeDefault
mxeditorjs.enabledEnable/disable editorYes
mxeditorjs.profileTool profile: default, minimal, blog, fulldefault
mxeditorjs.enabled_toolsCustom tool list (overrides profile)—
mxeditorjs.image_mediasourceMedia Source ID for images and gallery1
mxeditorjs.file_mediasourceMedia Source ID for attachments (Attaches)1
mxeditorjs.image_upload_pathImage upload path (Image, Gallery)images/resources/{resource_id}/
mxeditorjs.file_upload_pathAttachment upload path (Attaches)files/resources/{resource_id}/
mxeditorjs.gallery_max_countMax images in Gallery block (0 = no limit)0
mxeditorjs.max_upload_sizeMax file size in bytes (5 MB = 5242880)5242880
mxeditorjs.allowed_image_typesAllowed image extensionsjpg,jpeg,png,gif,webp,svg

Area: main (mxeditorjs) ​

mxeditorjs.enabled ​

When false, OnDocFormPrerender does not load CSS/JS. OnBeforeDocFormSave still writes the sidecar if POST contains mxeditorjs_json.

Typecombo-boolean
Defaulttrue

mxeditorjs.profile ​

Active tool profile name. Profiles are defined in mxeditorjs.profiles.

Typetextfield
Defaultdefault

Built-in profiles:

ProfileTools
defaultparagraph, header, list, checklist, quote, table, code, raw, embed, image, gallery, mxgallery, attaches, delimiter, warning
minimalparagraph, header, list, image
blogparagraph, header, list, quote, image, gallery, mxgallery, embed, delimiter
fullSame as default, including gallery and mxgallery

mxeditorjs.enabled_tools ​

If set, this comma-separated list is used and the profile is ignored.

Example: paragraph,header,list,embed,image

mxeditorjs.profiles ​

JSON object with profile definitions. Each profile has a tools array.

json
{
  "default": {
    "tools": ["paragraph", "header", "list", "checklist", "quote", "table",
              "code", "raw", "embed", "image", "gallery", "mxgallery", "attaches", "delimiter", "warning"]
  },
  "blog": {
    "tools": ["paragraph", "header", "list", "quote", "image", "gallery", "mxgallery", "embed", "delimiter"]
  }
}

To add a profile: add a key in JSON and set mxeditorjs.profile to its name.

mxeditorjs.available_tools ​

Whitelist of all package block tools. Fallback when profile tools is empty and enabled_tools is not set. Does not enable blocks directly when a profile is set. See priority below.

Default: paragraph,header,list,checklist,quote,table,code,raw,embed,image,gallery,mxgallery,attaches,delimiter,warning

IDDescription
paragraphParagraph
headerHeadings H2–H5
listBullet or numbered list
checklistChecklist
quoteQuote
tableTable
codeCode block
rawRaw HTML
embedEmbed (Paste API, no toolbox button)
imageImage (package ImageTool)
galleryGallery (fit/slider)
mxgallerymxGallery block (toolbox only when mxGallery is installed)
attachesFile attachment
delimiterDelimiter
warningWarning

Inline tools (marker, inline-code, underline, linkAutocomplete) and tunes (alignment, undo) are always on. They are not configured via profiles.

Area: media (mxeditorjs_media) ​

mxeditorjs.image_mediasource / mxeditorjs.file_mediasource ​

Media Source ID for images and for attachments (Attaches). Default 1.

mxeditorjs.image_upload_path ​

Path template inside Media Source for images (Image and Gallery blocks). Placeholder {resource_id} is replaced with the resource ID.

Examples: images/resources/{resource_id}/, uploads/images/, content/{resource_id}/img/

mxeditorjs.file_upload_path ​

Path template for attachments (Attaches block). Independent of image_upload_path.

Examples: files/resources/{resource_id}/, uploads/files/, content/{resource_id}/attachments/

mxeditorjs.gallery_max_count ​

Max images in one Gallery block. 0 = no limit. Upload and Browse use the same source and path as Image.

mxeditorjs.allowed_image_types ​

Allowed image extensions, comma-separated: jpg,jpeg,png,gif,webp,svg

mxeditorjs.max_upload_size ​

Max upload size in bytes. Examples: 1048576 (1 MB), 5242880 (5 MB), 10485760 (10 MB).

Area: presets (mxeditorjs_presets) ​

mxeditorjs.image_class_presets ​

JSON CSS classes for images. The user selects a style in Image block settings in the manager.

Format: {"display_name": "css-class"}

json
{
  "default": "",
  "full-width": "img-fluid w-100",
  "thumbnail": "img-thumbnail",
  "rounded": "rounded"
}

Внимание

Server HtmlRenderer and client renderPreviewHtml do not add the selected preset to <img>. The preset is stored in block JSON. For the frontend add custom logic or a custom image block renderer.

json
{
  "default": "",
  "button-primary": "btn btn-primary",
  "external": "external-link"
}

mxeditorjs.link_target_options / mxeditorjs.link_rel_options ​

JSON options for link target and rel. The class from link_class_presets is applied to link HTML on render.

SettingValue for mxEditorJsDescription
which_editormxEditorJsRTE choice in manager (required)
use_editortrueGlobal visual editor
which_element_editor(any)Element code editor. Does not affect mxEditorJs
cultureKeyen / ruUI language. mxEditorJs inherits it

Tool set priority ​

Implemented by MxEditorJs\Config\EditorTools:

  1. mxeditorjs.enabled_tools (if not empty): highest priority
  2. Else mxeditorjs.profiles[mxeditorjs.profile].tools intersect mxeditorjs.available_tools, plus package profile merge on upgrade (e.g. gallery, mxgallery)
  3. Else mxeditorjs.available_tools: fallback

On upgrade from versions before 1.1.0, resolver resolve.settings.php adds gallery and mxgallery to available_tools and profiles default, full, blog if missing. After upgrade check JSON in mxeditorjs.profiles and clear cache.

Package paths (not in transport) ​

mxeditorjs.core_path and mxeditorjs.assets_url are read by the plugin, bootstrap.php, and the connector. They are not in _build/elements/settings.php. Empty values fall back to core_path/assets_url + components/mxeditorjs/.