From a027a9f226c4032449142f36fa7fb43240944890 Mon Sep 17 00:00:00 2001 From: rakeshkumar1019 Date: Wed, 23 Aug 2023 06:54:35 +0530 Subject: [PATCH] test --- ui/package.json | 3 ++- ui/widgets/nuxeo-html-editor.js | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ui/package.json b/ui/package.json index 5111def20..2a5c64057 100644 --- a/ui/package.json +++ b/ui/package.json @@ -78,6 +78,7 @@ "d3-selection": "^1.3.0", "d3-shape": "^1.2.0", "moment": "2.23.0", - "nuxeo": "^4.0.3" + "nuxeo": "^4.0.3", + "quill-image-resize-module":"3.0.0" } } diff --git a/ui/widgets/nuxeo-html-editor.js b/ui/widgets/nuxeo-html-editor.js index 9c23571e0..3e457bea9 100644 --- a/ui/widgets/nuxeo-html-editor.js +++ b/ui/widgets/nuxeo-html-editor.js @@ -23,6 +23,7 @@ import '@nuxeo/quill/dist/quill.js'; import '../nuxeo-document-picker/nuxeo-document-picker.js'; import './quill/quill-snow.js'; import { mixinBehaviors } from '@polymer/polymer/lib/legacy/class'; +import { ImageResize } from 'quill-image-resize-module'; import { I18nBehavior } from '../nuxeo-i18n-behavior.js'; { @@ -182,8 +183,14 @@ import { I18nBehavior } from '../nuxeo-i18n-behavior.js'; ready() { super.ready(); // init editor + Quill.register('modules/imageResize', ImageResize); const { placeholder, readOnly } = this; - const modules = { toolbar: '#toolbar' }; + const modules = { + toolbar: '#toolbar', + ImageResize: { + modules: ['Resize', 'DisplaySize', 'Toolbar'] + } + }; this._editor = new Quill(this.$.editor, { theme: 'snow', modules, placeholder, readOnly }); // update value on change