12345678910111213141516171819202122232425262728 |
- class Theme {
- static DEFAULTS = {
- modules: {}
- };
- static themes = {
- default: Theme
- };
- modules = {};
- constructor(quill, options) {
- this.quill = quill;
- this.options = options;
- }
- init() {
- Object.keys(this.options.modules).forEach(name => {
- if (this.modules[name] == null) {
- this.addModule(name);
- }
- });
- }
- addModule(name) {
- // @ts-expect-error
- const ModuleClass = this.quill.constructor.import(`modules/${name}`);
- this.modules[name] = new ModuleClass(this.quill, this.options.modules[name] || {});
- return this.modules[name];
- }
- }
- export default Theme;
- //# sourceMappingURL=theme.js.map
|