Markdown Field Widget
by Terrabit https://www.terrabit.ro , Dorin Hongu https://www.terrabit.ro$ 32.87
Markdown Field Widget
Rich editing, raw Markdown storage
Markdown Field Widget adds a new OWL field widget — markdown — for any
Text field in the Odoo backend.
It gives users a familiar WYSIWYG editing experience (bold, italic, strikethrough, headings, lists, quotes, code blocks, links), while keeping the stored value as raw Markdown. The text in the database stays portable, easy to version and perfectly readable outside of Odoo.
Conversions happen entirely in the browser, with no server-side dependency at runtime:
- on load: Markdown → HTML (the marked library);
- on save: HTML → Markdown (the turndown library).
Both libraries are bundled locally as UMD builds, so the module works offline and needs no external CDN.
✨ Key features
- WYSIWYG toolbar: bold, italic, headings, lists, quotes, code blocks and links.
- Stores raw Markdown — portable, diff-friendly and readable anywhere.
- Instant MD ↔ HTML round-trip, fully client-side.
- Honors
readonly: in read-only mode it renders the Markdown as HTML, without the toolbar. - Configurable minimum editor height via the
min_heightoption.
⚙️ Usage
<field name="notes" widget="markdown"/>
<field name="notes" widget="markdown" options="{'min_height': 300}"/>
Odoo Online
The module contains no Python code, only JavaScript, QWeb templates and a style sheet (the marked and turndown libraries are bundled with it). Besides Odoo.sh and on-premise installations, it can be used on Odoo Online (Custom plan): download the zip and load it from Apps > Import Module.
Declare the field as Text on your model:
notes = fields.Text(string="Notes")
Then use the markdown widget in the form view:
<field name="notes" widget="markdown"/>
Supported options:
min_height— minimum height of the editing area, in pixels (default160):
<field name="notes" widget="markdown" options="{'min_height': 300}"/>
The widget honors readonly: in read-only mode it renders the Markdown as HTML,
without the toolbar.
Editing. In edit mode the toolbar sits above the field; select text and press a button to format it. The value is saved as Markdown when you leave the field and save the record.
Read-only. The text is shown formatted, without the toolbar.
Safe display. Since 19.0.1.0.5 the HTML produced from the Markdown is sanitized
before it is displayed, in edit and read-only mode, including for values stored
earlier. Harmless inline HTML such as <kbd> or <mark> keeps its formatting;
scripts, inline event handlers, javascript: links and embedded content (<iframe>,
<object>, <embed>) are not displayed. Replace embedded videos or maps with a
regular link.
Strikethrough, inline HTML such as <kbd> or <mark> and tables are not kept when
the text is edited and saved: only standard Markdown is stored.
20.0.1.1.1 (2026-11-17)
- Migration to 20.0 (Owl 3). The component props and the default minimum height are declared
with
useProps, and the editor reference usessignal.ref(). The Font Awesome icons of the toolbar are replaced by Odoo icons (oiwithdata-icon). The placeholder is taken from the field info prepared by the view (placeholderattribute orplaceholder_fieldoption), as the standard text field does in 20.0. - The module stays data-only and importable on Odoo Online (Apps > Import Module).
19.0.1.1.1 (2026-11-16)
- Empty
__init__.pyrestored: the OCA tools (manifestoo, oca-checks-odoo-module) do not recognize a module without it, so the CI of the suites that depend on this module failed. The module still has no Python code and still imports on Odoo Online. - Explicit Odoo Online marker:
"online": trueinstatic/description/banner.json(the banner no longer infers it from the missing.pyfiles).
19.0.1.1.0 (2026-11-16)
- Data-only module, importable on Odoo Online (Custom plan) from Apps > Import Module: the
__init__.pyfiles and thetests/folder were removed, because Odoo Apps treats any.pyfile as Python code and does not list the module as available on Odoo Online. - The Python runner of the JavaScript tests (
tests/test_js.py) and the screenshot test of the consultant sheet (tests/test_screenshots.py) were removed; the Hoot tests stay instatic/tests/and run with the web unit tests (/web/tests?filter=@deltatech_markdown_field). - The asset paths are listed file by file: an imported module rejects glob wildcards in asset paths.
19.0.1.0.7 (2026-11-14)
- Apps Store banner: the "Odoo Online" badge shows that the module has no Python code and installs on Odoo Online.
19.0.1.0.6 (2026-11-08)
- Fix: strikethrough, tables and task lists are no longer lost when the editor is left. The HTML → Markdown step now writes them back as
~~text~~, GFM tables (with column alignment) and[x]/[ ]items; a table Markdown cannot express (merged cells, lists or paragraphs in a cell) is kept as HTML instead of being flattened. Values already flattened by an earlier save cannot be recovered.
19.0.1.0.5 (2026-11-07)
- Fix: the HTML produced from the Markdown is sanitized (DOMPurify) before it is displayed, in edit and in read-only mode. Scripts, inline event handlers,
javascript:links and embedded content (<iframe>,<object>,<embed>) are removed; Markdown formatting and harmless inline HTML stay as they were.
19.0.1.0.4 (2026-10-22)
- Listed on Odoo Apps as Markdown Field Widget (was Markdown Field). The technical name
deltatech_markdown_fielddoes not change.
19.0.1.0.3 (2026-10-12)
- Fix: on servers with Python < 3.11 (rjsmin 1.1.0) the minified asset bundle broke on a regular expression of the vendored marked library (
Invalid regular expression: /^*-+:*$/), stopping the backend in non-debug mode and the JS unit tests. The expression is now wrapped in parentheses, so it survives minification.
19.0.1.0.2 (2026-10-11)
- Docs: emoji symbols added to the bold headings of the module description, for a uniform look on the Odoo Apps page. No code change.
19.0.1.0.1 (2026-09-29)
- Own module icon, instead of the generic gears it had.
✓ Included in the Terrabit support subscription
If Terrabit is your Odoo implementation partner, your support subscription includes the right to use this module and every other Terrabit module, with no separate purchase. The modules are kept up to date with each new Odoo version and supported by the developers who build them.
Need help getting started?
Our 800+ apps on the Odoo Apps Store are used in Odoo implementations across Europe, the Americas, Asia and Africa — by companies we have never even met. That is the advantage of building modules that simply work.
Questions about this module? Write to us — the developers who build it will answer.
More apps by Terrabit
Other modules from the same publisher, built to work together. All apps →
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 1133 |
| Technical Name |
deltatech_markdown_field |
| License | OPL-1 |
| Website | https://www.terrabit.ro |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module