From b5a08d728a4920c3d51982243995e35ef176d0a0 Mon Sep 17 00:00:00 2001 From: Giovanni Francesco Capalbo Date: Thu, 8 Sep 2022 11:34:01 +0200 Subject: [PATCH 1/2] [ADD] web_widget_html_markdown --- .../odoo/addons/web_widget_html_markdown | 1 + setup/web_widget_html_markdown/setup.py | 6 + web_widget_html_markdown/README.rst | 113 + web_widget_html_markdown/__init__.py | 1 + web_widget_html_markdown/__manifest__.py | 24 + .../demo/bootstrap_markdown.xml | 12 + .../readme/CONTRIBUTORS.rst | 3 + web_widget_html_markdown/readme/CREDITS.rst | 1 + .../readme/DESCRIPTION.rst | 11 + web_widget_html_markdown/readme/ROADMAP.rst | 1 + web_widget_html_markdown/readme/USAGE.rst | 26 + .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 454 +++ .../src/css/web_widget_html_markdown.css | 54 + .../static/src/js/web_widget_html_markdown.js | 478 +++ .../static/src/lib/bootstrap-markdown.js | 1575 ++++++++ .../static/src/lib/bootstrap-markdown.min.css | 1 + .../static/src/lib/dropzone.js | 3530 +++++++++++++++++ .../static/src/lib/marked.js | 1664 ++++++++ .../static/src/xml/radio_info.xml | 50 + web_widget_html_markdown/views/assets.xml | 21 + 21 files changed, 8026 insertions(+) create mode 120000 setup/web_widget_html_markdown/odoo/addons/web_widget_html_markdown create mode 100644 setup/web_widget_html_markdown/setup.py create mode 100644 web_widget_html_markdown/README.rst create mode 100644 web_widget_html_markdown/__init__.py create mode 100644 web_widget_html_markdown/__manifest__.py create mode 100644 web_widget_html_markdown/demo/bootstrap_markdown.xml create mode 100644 web_widget_html_markdown/readme/CONTRIBUTORS.rst create mode 100644 web_widget_html_markdown/readme/CREDITS.rst create mode 100644 web_widget_html_markdown/readme/DESCRIPTION.rst create mode 100644 web_widget_html_markdown/readme/ROADMAP.rst create mode 100644 web_widget_html_markdown/readme/USAGE.rst create mode 100644 web_widget_html_markdown/static/description/icon.png create mode 100644 web_widget_html_markdown/static/description/index.html create mode 100644 web_widget_html_markdown/static/src/css/web_widget_html_markdown.css create mode 100644 web_widget_html_markdown/static/src/js/web_widget_html_markdown.js create mode 100644 web_widget_html_markdown/static/src/lib/bootstrap-markdown.js create mode 100644 web_widget_html_markdown/static/src/lib/bootstrap-markdown.min.css create mode 100644 web_widget_html_markdown/static/src/lib/dropzone.js create mode 100644 web_widget_html_markdown/static/src/lib/marked.js create mode 100644 web_widget_html_markdown/static/src/xml/radio_info.xml create mode 100644 web_widget_html_markdown/views/assets.xml diff --git a/setup/web_widget_html_markdown/odoo/addons/web_widget_html_markdown b/setup/web_widget_html_markdown/odoo/addons/web_widget_html_markdown new file mode 120000 index 000000000000..771299155630 --- /dev/null +++ b/setup/web_widget_html_markdown/odoo/addons/web_widget_html_markdown @@ -0,0 +1 @@ +../../../../web_widget_html_markdown \ No newline at end of file diff --git a/setup/web_widget_html_markdown/setup.py b/setup/web_widget_html_markdown/setup.py new file mode 100644 index 000000000000..28c57bb64031 --- /dev/null +++ b/setup/web_widget_html_markdown/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/web_widget_html_markdown/README.rst b/web_widget_html_markdown/README.rst new file mode 100644 index 000000000000..8983144f7200 --- /dev/null +++ b/web_widget_html_markdown/README.rst @@ -0,0 +1,113 @@ +======================== +Web Widget Html Markdown +======================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github + :target: https://github.com/OCA/web/tree/14/web_widget_html_markdown + :alt: OCA/web +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/web-14/web-14-web_widget_html_markdown + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/162/14 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Behaviour of the module and best practices +========================================== + +This module implements a Markdown editor on Html fields, in contrast to web_widget_text_markdown, which implements it on Text fields. In readonly mode, the widget displays HTML, but when editing, the widget offers you an option to edit in Markdown or in HTML. If you edit markdown, it will save as the rendered HTML, but with the source Markdown embedded inside a