Skip to content

Commit

Permalink
[IMP] web_widget_markdown: SimpleMDE ➔ EasyMDE
Browse files Browse the repository at this point in the history
SimpleMDE is no longer maintained: sparksuite/simplemde-markdown-editor#829
➔ Switch to [EasyMDE](https://github.com/Ionaru/easy-markdown-editor), a fork.

readonly mode: `EasyMDE.prototype.markdown` is no longer as simple as
`SimpleMDE.prototype.markdown` used to be (now requires an EasyMDE
instance) so this cset instead adds the `marked` lib to call it
directly, without relying on EasyMDE's wrapper.
  • Loading branch information
houzefa-abba committed Apr 7, 2023
1 parent 615b177 commit b209f49
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 44 deletions.
11 changes: 8 additions & 3 deletions web_widget_markdown/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
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](https://simplemde.com/) as a Markdown Editor for the
This module uses the JavaScript library [EasyMDE](https://github.com/Ionaru/easy-markdown-editor) as a Markdown Editor for the
client.

And the python [Markdown library](https://github.com/Python-Markdown/markdown) for backend usage.
Expand Down Expand Up @@ -34,7 +34,7 @@ In your xml view, add `widget="markdown"` to any Text field.
### Options

In the options attribute, pass any options of
[SimpleMDE](https://github.com/sparksuite/simplemde-markdown-editor#configuration) configuration.
[EasyMDE](https://github.com/Ionaru/easy-markdown-editor#configuration) configuration.

## Usage in report / Website templates

Expand All @@ -55,8 +55,13 @@ Do not contact contributors directly about support or help with technical issues

## Credits

Big thanks to the authors of [SimpleMDE](https://github.com/sparksuite/simplemde-markdown-editor).
Big thanks to the authors of [EasyMDE](https://github.com/Ionaru/easy-markdown-editor),
which is based on [SimpleMDE](https://github.com/sparksuite/simplemde-markdown-editor).

### Widget Author

[![Coding Dodo](https://res.cloudinary.com/phildl-cloudinary/image/upload/w_300/v1617638212/codingdodo/Coding_Dodo_rplksw.png)](https://codingdodo.com)

### Widget Contributors

* [XCG](https://xcg-consulting.fr/)
7 changes: 4 additions & 3 deletions web_widget_markdown/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"author": "Coding Dodo",
"website": "https://github.com/Coding-Dodo/web",
"category": "web",
"version": "16.0.1.0.0",
"version": "16.0.1.1.0",
"license": "AGPL-3",
"depends": ["base", "web"],
"data": [],
Expand All @@ -17,13 +17,14 @@
"web.assets_backend": [
"/web_widget_markdown/static/src/js/markdown_field.js",
"/web_widget_markdown/static/src/js/markdown_field.xml",
"/web_widget_markdown/static/lib/simplemde.min.css",
"/web_widget_markdown/static/lib/easymde.min.css",
],
"web.assets_qweb": [
"/web_widget_markdown/static/src/xml/qweb_template.xml",
],
"web.tests_assets": [
"/web_widget_markdown/static/lib/simplemde.min.js",
"/web_widget_markdown/static/lib/easymde.min.js",
"/web_widget_markdown/static/lib/marked.min.js",
],
"web.qunit_suite_tests": [
"/web_widget_markdown/static/tests/**/*",
Expand Down
7 changes: 7 additions & 0 deletions web_widget_markdown/static/lib/easymde.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions web_widget_markdown/static/lib/easymde.min.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions web_widget_markdown/static/lib/marked.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit b209f49

Please sign in to comment.