Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshkumar1019 committed Aug 23, 2023
1 parent 3cb8f45 commit a027a9f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
9 changes: 8 additions & 1 deletion ui/widgets/nuxeo-html-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

{
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a027a9f

Please sign in to comment.