Skip to content

Odoo JavaScript Widget to add markdown support to Text Field (Edit and Readonly modes).

License

Notifications You must be signed in to change notification settings

Coding-Dodo/web_widget_markdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Odoo 14.0 web widget Markdown

This widget add a markdown Editor to Text field. In Edit mode the Editor is fuly usable and in readonly mode the widget shows a naive transformation of markdown to HTML as a preview.

This module uses the JavaScript library SimpleMDE as a Markdown Editor for the client.

And the python Markdown library for backend usage.

pip install markdown

This is also the source code for the the article written on codingdodo.com about Test Driven Developement in Odoo 14 JavaScript.

Usage

In your xml view, add widget="markdown" to any Text field.

<field name="mytextfield" widget="markdown" options="{'placeholder': 'Type content here'}">

Edit mode

Markdown Editor

Readonly mode

Markdown Render

Options

In the options attribute, pass any options of SimpleMDE configuration.

Usage in report / Website templates

There is also a t-options widget markdown available for usage in PDF reports (rendered server side in python)

<div t-raw="o.content" t-options="{'widget': 'markdown'}"></div>

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Big thanks to the authors of SimpleMDE.

Widget Author

Coding Dodo

About

Odoo JavaScript Widget to add markdown support to Text Field (Edit and Readonly modes).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published