Appearance
These options control the visual presentation of the editor, including its skin, icon set, theme, content styling, and visual aids.
Options
| Option | Type | Default | Description |
|---|---|---|---|
skin | string/false | 'oxide' | Name of the skin to load. Set to false to skip skin loading entirely. |
skin_url | string | — | URL to a directory containing custom skin files. Overrides the default skin path. |
icons | string | '' | Name of the icon pack to use. |
icons_url | string | '' | URL to a custom icon pack JS file. |
theme | string/false/function | 'silver' | Theme to use. Set to false for a headless editor or provide a function for a fully custom theme. |
theme_url | string | — | URL to a custom theme JS file. |
branding | boolean | true | Show Editor42 branding in the status bar. |
promotion | boolean | false | Show an "Upgrade" promotion link in the editor UI. Off by default — Editor42 has no premium tier. |
content_css | string[]/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_style | string | — | Inline CSS injected directly into the editor content. Applied after content_css. |
content_css_cors | boolean | false | Enable CORS headers when loading content CSS files. |
font_css | string[]/string | [] | Additional CSS files for loading custom web fonts inside the editor content. |
body_class | string | '' | CSS class applied to the <body> element inside the editor iframe. |
body_id | string | 'editor42' | ID applied to the <body> element inside the editor iframe. |
placeholder | string | — | Placeholder text displayed when the editor is empty. |
highlight_on_focus | boolean | false | Visually highlight the editor border when it receives focus. |
visual | boolean | true | Enable visual aids that show invisible elements like table borders and anchors. |
visual_table_class | string | 'editor42-m-item-table' | CSS class applied to tables when visual aids are active. |
visual_anchor_class | string | '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
});