qsm-odoo 9fcaeb96ef [FIX] web_editor: solve bold command issues
Summernote uses execCommand and, worth, obsolete queryCommandState
function to customize the edited content. Here we try to hack the
function to solve some problems by making the DOM and style easier to
understand for the base functions for the duration of their executions.
This won't obviously solves all problems but this is an improvement
while waiting for the new Odoo editor coming in future versions.

The original problem this solves is handling bold text in blog posts.
Posts are using font-weight: 300 which is enough to confuse summernote.
Hitting bold on a selected paragraph wraps its content in a <b> tag but
hitting bold again does nothing... having a <b> rendered as fw-400 is
enough to break it. What this commit does is: before any execCommand or
queryCommandState being used to modify the DOM or retrieve its state,
the whole DOM is forced to fw-400 and <b> elements to fw-700. This also
solves issues in some base snippets.

closes odoo/odoo#64483

X-original-commit: 424d9661c5657cbcf10ce40acb94a7a200c2a48b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-13 13:45:35 +00:00
2021-01-12 13:16:18 +00:00
2020-04-20 11:41:39 +00:00
…
…
2015-09-08 17:58:38 +02:00
2019-11-08 11:24:04 +00:00
2020-09-28 14:07:25 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%