[FIX] web_editor: images stored as base64-encoded sources
Commit [1] introduced an option in the Wysiwyg widget to save pasted and dropped images as attachments instead of keeping them as inline base64-encoded sources. In order to prevent records from having excessively large sizes in their html field content, this commit makes such option the default one for the Wysiwyg class. task-3289061 [1]: https://github.com/odoo/odoo/commit/b8e7fb4a5ec8c75deff37dc1737b6a3d3b123cc3 closes odoo/odoo#130213 X-original-commit: 7e06b40ea58f58069729f881f7d4559d17778fe7 Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -262,6 +262,7 @@ export class Wysiwyg extends Component {
|
||||
insertParagraphAfterColumns: true,
|
||||
onHistoryResetFromSteps: () => {},
|
||||
autostart: true,
|
||||
dropImageAsAttachment: true,
|
||||
}
|
||||
init() {
|
||||
this.id = ++id;
|
||||
|
||||
@@ -152,7 +152,6 @@ export class WysiwygAdapterComponent extends Wysiwyg {
|
||||
this.options.toolbarHandler = $('#web_editor-top-edit');
|
||||
// Do not insert a paragraph after each column added by the column commands:
|
||||
this.options.insertParagraphAfterColumns = false;
|
||||
this.options.dropImageAsAttachment = true;
|
||||
|
||||
const $editableWindow = this.$editable[0].ownerDocument.defaultView;
|
||||
// Dropdown menu initialization: handle dropdown openings by hand
|
||||
|
||||
Reference in New Issue
Block a user