diff options
| author | Christophe Matthieu <chm@odoo.com> | 2019-01-28 09:39:56 +0000 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2019-02-14 15:11:19 +0000 |
| commit | b49745e52d7a7bc27afd416206dcd5fa242aa07a (patch) | |
| tree | ae6a047da7e77b951db241e1342278ce543972e2 /addons/web_editor/static/src/js/backend/convert_inline.js | |
| parent | 7daa85dd12ff522be510bc2f8db1d968cae7d891 (diff) | |
[IMP] web_editor: lazy load the wysiwyg
Issue: wysiwyg asset slow down the loading of the website, error
inadvertently introduced: https://github.com/odoo/odoo/pull/29775
The assets are now loaded assynchroneously, when the editor is needed,
its assets will be loaded.
closes odoo/odoo#30700
Diffstat (limited to 'addons/web_editor/static/src/js/backend/convert_inline.js')
| -rw-r--r-- | addons/web_editor/static/src/js/backend/convert_inline.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/backend/convert_inline.js b/addons/web_editor/static/src/js/backend/convert_inline.js index 3b09bef5f31..b6b36a388ef 100644 --- a/addons/web_editor/static/src/js/backend/convert_inline.js +++ b/addons/web_editor/static/src/js/backend/convert_inline.js @@ -1,7 +1,6 @@ odoo.define('web_editor.convertInline', function (require) { 'use strict'; -var fonts = require('wysiwyg.fonts'); var FieldHtml = require('web_editor.field.html'); /** @@ -189,6 +188,8 @@ function getMatchedCSSRules(a) { * converted to images */ function fontToImg($editable) { + var fonts = odoo.__DEBUG__.services["wysiwyg.fonts"]; + $editable.find('.fa').each(function () { var $font = $(this); var icon, content; |
