1 | import Parchment from 'parchment';
|
2 |
|
3 | let config = {
|
4 | scope: Parchment.Scope.INLINE,
|
5 | whitelist: ['serif', 'monospace']
|
6 | };
|
7 |
|
8 | let FontClass = new Parchment.Attributor.Class('font', 'ql-font', config);
|
9 |
|
10 | class FontStyleAttributor extends Parchment.Attributor.Style {
|
11 | value(node) {
|
12 | return super.value(node).replace(/["']/g, '');
|
13 | }
|
14 | }
|
15 |
|
16 | let FontStyle = new FontStyleAttributor('font', 'font-family', config);
|
17 |
|
18 | export { FontStyle, FontClass };
|