html
The HTML field is Odoo's rich text editor: checklists, tables, images, slash commands. Under the hood it is two widgets wearing one name, and its options live nowhere in the documentation.
| Studio name | Html |
|---|---|
| Technical name | html |
| Field types | html |
| Views | form |
| Module | html_editor (auto-installed), overriding a fallback in web |
| Used in core | 9 occurrences across 8 modules, including snailmail, base_install_request, survey, lunch, website_slides, account, plus every html field rendered without an explicit widget |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | Yes, via Odoo Studio (Enterprise) |
| Alternatives | html_mail, text, properties, char with emoji picker |
What the HTML field does
What this means for your team
Setting it up in Odoo Studio (no code)
What Studio cannot do here
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
height | number | Fixed editor height in pixels, with overflow scrolling added automatically. |
allowImage | boolean | Enables images in the media dialog and pastes. Replaces 18's inverted disableImage.(default: true)(since Odoo 19.0) |
allowMediaDocuments | boolean | Enables document attachments in the media dialog.(default: true)(since Odoo 19.0) |
allowVideo | boolean | Enables video embeds. Replaces 18's disableVideo.(default: true)(since Odoo 19.0) |
allowFile | boolean | Enables file uploads and drops. Replaces 18's disableFile.(default: true)(since Odoo 19.0) |
allowChecklist | boolean | Enables the interactive checklist block.(default: true)(since Odoo 19.0) |
allowAttachmentCreation | boolean | Sets allowImage and allowFile together, and wins over both because it is applied after them in the source.(since Odoo 19.0) |
baseContainers | list | Which block elements the editor uses as paragraph containers. Renamed from 18's baseContainer.(since Odoo 19.0) |
cleanEmptyStructuralContainers | boolean | Strips empty structural wrappers from content.(since Odoo 19.0) |
debouncePowerbuttons | boolean | Debounces the slash-command power buttons for performance on heavy documents.(since Odoo 19.0) |
debounceHints | boolean | Debounces the empty-block placeholder hints.(since Odoo 19.0) |
collaborative | boolean | Enables real-time multi-user editing over the bus, with live peer cursors. |
collaborative_trigger | string | When to join the sync session: start (immediately) or focus (when the user enters the field). |
migrateHTML | boolean | Runs stored content through editor version migrations on load.(default: true)(since Odoo 19.0) |
dynamic_placeholder | boolean | Enables the dynamic placeholder flow for template expressions. |
dynamic_placeholder_model_reference_field | field name | Field on the current record naming the model dynamic placeholders resolve against. |
embedded_components | boolean | Activates interactive embedded blocks in readonly renders.(default: true) |
sandboxedPreview | boolean | Forces the sandboxed iframe preview. Full HTML documents in the content trigger it automatically even without the option. |
cssReadonly | asset id | Asset bundle used to style readonly content inside its iframe, as email previews do. |
codeview | boolean | Adds a raw-HTML toggle, but only when developer mode is also active. |
Order matters for the allow-family. allowAttachmentCreation is applied after allowImage and allowFile in the source, so when both are set, the attachment-creation flag wins. And codeview is doubly gated: the option must be set and developer mode must be active, or no code toggle appears.
Working examples
Why some HTML fields lock themselves into a preview
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Every option above is still read on the development branch; internals are renamed. Details below. |
| Odoo 19.0 | Verified | Verified against the shipped html_editor source. |
| Odoo 18.0 | Partial / changed | Same editor, different option names: the disable-family and baseContainer. See the upgrade note. |
| Odoo 17.0 | Partial / changed | html fields render through the previous web_editor wysiwyg, with a different option set. |
| Odoo 16.0 | Partial / changed | Previous-generation editor (web_editor), different options and behavior. |
Upgrade note for 18 to 19: options were renamed. Odoo 18's disableImage, disableVideo and disableFile no longer exist; 19 reads allowImage, allowMediaDocuments, allowVideo, allowFile, allowChecklist and allowAttachmentCreation with inverted meaning. baseContainer became baseContainers. Custom views carrying the 18 spellings silently lose their restrictions after an upgrade, which is exactly the kind of thing an upgrade audit is for. 19 also added migrateHTML, cleanEmptyStructuralContainers and the two debounce flags.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The field shows raw HTML in a plain textarea | The html_editor module is missing, so the web fallback widget is rendering. Install html_editor; it is auto-install on standard databases. |
| The field became a locked preview and cannot be edited inline | The content contains a full HTML document, which auto-engages the sandboxed preview. Edit via codeview with developer mode, or strip the document skeleton from the content. |
| codeview option set but no code toggle appears | The toggle requires developer mode in addition to the option. Enable developer mode, then reopen the form. |
| disableImage stopped working after upgrading to 19 | The disable-family options were replaced by the allow-family in 19. Rewrite as allowImage: False and review the whole option dict against the 19 names. |
| Styles are stripped every time the record saves | Server-side sanitization on the field definition, not the widget. Adjust the field's sanitize attributes in Python, deliberately and minimally. |
| Collaborative cursors never appear | collaborative not set, or the trigger is focus and nobody else has entered the field. Set collaborative: true and check the bus service is reachable behind your proxy. |
HTML field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
html | Rich text the user writes: descriptions, terms, articles, notes | Full editor with slash commands, sanitized server side |
| html_mail | Email template bodies | Same editor plus CSS inlining on save and mail-safe restrictions |
| text | Plain multiline text without formatting | No markup at all, stores clean text |
| properties | User-defined extra fields rather than one rich text block | Different problem: ad hoc fields, though html is one of its property types |
char with emoji picker | Single-line text with emoji support | One line, no block formatting |
Frequently asked questions
Which module provides the Odoo html widget?+
How do I set the height of an Odoo html field?+
How do I disable images or file uploads in the editor?+
Why is my html field showing a preview I cannot edit?+
Can two users edit the same html field at once?+
Does the html widget change in Odoo 20?+
Editor fighting your content team?
Locked-down template editors, collaborative drafting, clean PDF output, migrated email templates that survived the 18 to 19 option renames: the HTML field rewards precise configuration. We configure and extend the Odoo editor so content stays clean from draft to customer.
Get your editor configured right