Skip to content

pantoken-root / renderers/tinymce/src / buildIconMarkup

Function: buildIconMarkup() ​

buildIconMarkup(icon): string

The decorative icon markup left in editor content after a picker selection. A zero-width space prevents the span from being truly empty — TinyMCE's schema strips empty inline elements on setContent() (e.g. switching from source view back to WYSIWYG), which would otherwise silently remove this CSS-painted glyph. contenteditable="false" makes TinyMCE treat it as a selectable, non-editable object (fake-selection painting, backspace-to-delete, and the context toolbar registered in lib/icon-context-toolbar.ts) instead of plain inline text.

Parameters ​

icon ​

TaggedIcon

Returns ​

string