Index

ALLOWED_STYLES

MMO.editor · 1 symbol · generated 30 Sep 2026

namespace

ALLOWED_STYLES

editor.js:49

The css properties an allowed style attribute keeps. A colour is only kept when it is a design token (var(--mmo-color-…)): a colour pasted from elsewhere would not follow the theme, nor the dark mode.

MMO.editor.ALLOWED_STYLES = {…}
Namespace
MMO.editor

Properties4

text-align

editor.js:50
text-align = (value) => ['left', 'center', 'right', 'justify'].includes(value)

color

editor.js:51
color = (value) => /^var\(--mmo-color-[a-z0-9-]+\)$/.test(value)

background-color

editor.js:52
background-color = (value) => /^var\(--mmo-color-[a-z0-9-]+\)$/.test(value)

width

editor.js:53
width = (value) => /^\d+(\.\d+)?(px|%)$/.test(value)