devextreme
Version:
JavaScript/TypeScript Component Suite for Responsive Web Development
44 lines (43 loc) • 1.55 kB
JavaScript
/**
* DevExtreme (esm/__internal/ui/html_editor/modules/m_base.js)
* Version: 26.1.6
* Build date: Fri Oct 16 2026
*
* Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import {
isDefined,
isObject
} from "../../../../core/utils/type";
import Quill from "devextreme-quill";
import EmptyModule from "./empty";
let BaseModule = EmptyModule;
if (Quill) {
const BaseQuillModule = Quill.import("core/module");
BaseModule = class extends BaseQuillModule {
constructor(quill, options) {
super(quill, options);
this.editorInstance = options.editorInstance
}
saveValueChangeEvent(event) {
this.editorInstance._saveValueChangeEvent(event)
}
addCleanCallback(callback) {
this.editorInstance.addCleanCallback(callback)
}
handleOptionChangeValue(changes) {
if (isObject(changes)) {
Object.entries(changes).forEach(_ref => {
var _this$option;
let [name, value] = _ref;
return null === (_this$option = this.option) || void 0 === _this$option ? void 0 : _this$option.call(this, name, value)
})
} else if (!isDefined(changes)) {
var _this$clean;
null === (_this$clean = this.clean) || void 0 === _this$clean || _this$clean.call(this)
}
}
}
}
export default BaseModule;