[IMP] web_editor: update Jabberwock library to commit 3bbb175c

Changelog:
[IMP] Odoo: add option to wrap the main zone

X-original-commit: 3fff28df08678a1ca4f5b60d5d96bfeb6115f31c
This commit is contained in:
David Monjoie
2020-12-11 17:56:51 +00:00
parent dc9017be05
commit c498dfcb19
@@ -24023,6 +24023,9 @@ odoo.define('web_editor.jabberwock', (function(require) {
class OdooWebsiteEditor extends JWEditor {
constructor(options) {
super();
if (typeof options.wrapMain === 'undefined') {
options.wrapMain = true;
}
class CustomPlugin extends JWPlugin {
constructor() {
super(...arguments);
@@ -24152,14 +24155,23 @@ odoo.define('web_editor.jabberwock', (function(require) {
{
id: 'main',
render: async () => {
const div = new DividerNode();
div.modifiers.get(Attributes).set('contentEditable', 'true');
div.modifiers.get(Attributes).classList.add('note-editable', 'o_editable');
div.modifiers.get(Attributes).style.set('width', '100%');
const zone = new ZoneNode({ managedZones: ['editable'] });
zone.editable = true;
div.append(zone);
return [div];
if (options.wrapMain) {
const div = new DividerNode();
div.modifiers.get(Attributes).set('contentEditable', 'true');
div.modifiers
.get(Attributes)
.classList.add('note-editable', 'o_editable');
div.modifiers.get(Attributes).style.set('width', '100%');
const zone = new ZoneNode({ managedZones: ['editable'] });
zone.editable = true;
div.append(zone);
return [div];
}
else {
const zone = new ZoneNode({ managedZones: ['editable'] });
zone.editable = true;
return [zone];
}
},
},
{