Skip to main content

Appearance

These options control the visual presentation of the editor, including its skin, icon set, theme, content styling, and visual aids.

Options

OptionTypeDefaultDescription
skinstring/false'oxide'Name of the skin to load. Set to false to skip skin loading entirely.
skin_urlstringURL to a directory containing custom skin files. Overrides the default skin path.
iconsstring''Name of the icon pack to use.
icons_urlstring''URL to a custom icon pack JS file.
themestring/false/function'silver'Theme to use. Set to false for a headless editor or provide a function for a fully custom theme.
theme_urlstringURL to a custom theme JS file.
brandingbooleantrueShow Editor42 branding in the status bar.
promotionbooleanfalseShow an "Upgrade" promotion link in the editor UI. Off by default — Editor42 has no premium tier.
content_cssstring[]/string/false['default']CSS files loaded into the editor content iframe. Use skin names like 'default' or 'dark', or provide custom URLs. Set to false to load no content CSS.
content_stylestringInline CSS injected directly into the editor content. Applied after content_css.
content_css_corsbooleanfalseEnable CORS headers when loading content CSS files.
font_cssstring[]/string[]Additional CSS files for loading custom web fonts inside the editor content.
body_classstring''CSS class applied to the <body> element inside the editor iframe.
body_idstring'editor42'ID applied to the <body> element inside the editor iframe.
placeholderstringPlaceholder text displayed when the editor is empty.
highlight_on_focusbooleanfalseVisually highlight the editor border when it receives focus.
visualbooleantrueEnable visual aids that show invisible elements like table borders and anchors.
visual_table_classstring'editor42-m-item-table'CSS class applied to tables when visual aids are active.
visual_anchor_classstring'editor42-m-item-anchor'CSS class applied to anchors when visual aids are active.

Example

editor42.init({
selector: 'textarea',
skin: 'oxide-dark',
content_css: 'dark',
icons: 'material',
placeholder: 'Start typing here...',
content_style: 'body { font-family: Arial, sans-serif; font-size: 14px; }',
highlight_on_focus: true
});