1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/quill/formats/bold.js

23 lines
410 B
JavaScript
Raw Normal View History

2023-12-18 13:12:25 +08:00
import Inline from '../blots/inline';
class Bold extends Inline {
static create() {
return super.create();
}
static formats() {
return true;
}
optimize(context) {
super.optimize(context);
if (this.domNode.tagName !== this.statics.tagName[0]) {
this.replaceWith(this.statics.blotName);
}
}
}
Bold.blotName = 'bold';
Bold.tagName = ['STRONG', 'B'];
export default Bold;