Files
tp-rich-text-box/tp-rtb-clear-format.js
2025-07-06 19:03:59 +02:00

17 lines
410 B
JavaScript

import { TpRtbBaseExtension } from './tp-rtb-base-extension.js';
class TpRtbClearFormat extends TpRtbBaseExtension {
constructor() {
super();
this.label = 'Clear Format';
}
_handleClick() {
if (this.parentEditor && this.parentEditor.editor) {
this.parentEditor.editor.chain().focus().unsetAllMarks().run();
}
}
}
customElements.define('tp-rtb-clear-format', TpRtbClearFormat);