You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make the inline marks (bold, italic, strikethrough, underline) configurable
via Lexxy.configure or a `marks` element attribute, as an allow-list. The
default enables all four, preserving current behavior. Accepts a JSON array
(marks='["bold","italic"]') or a whitespace-separated string (marks="bold
italic"); pass [] to disable every mark.
A disabled mark is inert everywhere, not just hidden from the toolbar: its
FORMAT_TEXT_COMMAND is swallowed by a high-priority interceptor (covering the
toolbar button, programmatic dispatch, and the native Cmd+B/I/U shortcuts), its
Markdown shortcut transformers are filtered out, its toolbar button is hidden
via a data-disabled-marks attribute, and its semantic tags are dropped from the
HTML import conversions so saved markup is reduced to plain text on load and
paste. A TextNode transform additionally clears any disabled-mark format bit
restored from pasted Lexical clipboard data.
Copy file name to clipboardExpand all lines: docs/configuration.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,7 @@ Editors support the following options, configurable using presets and element at
47
47
-`toolbar.upload`: Control which upload button(s) appear in the toolbar. Accepts `"file"`, `"image"`, or `"both"` (default). The image button restricts the file picker to images and videos (`accept="image/*,video/*"`), which triggers the native photo/video picker on iOS and Android. The file button opens an unrestricted file picker.
48
48
-`attachments`: Pass `false` to disable attachments completely. By default, attachments are supported, including paste and drag & drop support. For finer-grained control — keeping attachments enabled while restricting which content types are accepted — use `permittedAttachmentTypes`.
49
49
-`markdown`: Pass `false` to disable Markdown support.
50
+
-`marks`: Choose which inline marks the editor allows, as an allowlist. Defaults to `["bold", "italic", "strikethrough", "underline"]` (all). Any mark left out is disabled everywhere — its toolbar button is hidden, its keyboard shortcut and Markdown shortcut are inert, and its markup is reduced to plain text on import (paste, `value`, and initial content). Pass `[]` to disable all inline marks. Example: `<lexxy-editor marks='["bold", "italic"]'></lexxy-editor>`.
50
51
-`multiLine`: Pass `false` to force single line editing.
51
52
-`permittedAttachmentTypes`: Restrict the editor to a specific allowlist of attachment content types. Unset (the default) permits any content type. Example: `<lexxy-editor permitted-attachment-types="application/vnd.basecamp.mention application/vnd.basecamp.opengraph-embed"></lexxy-editor>`.
52
53
-`richText`: Pass `false` to disable rich text editing.
0 commit comments