You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
478 B
14 lines
478 B
import { ClassAttributor, Scope, StyleAttributor } from 'parchment'; |
|
const config = { |
|
scope: Scope.INLINE, |
|
whitelist: ['serif', 'monospace'] |
|
}; |
|
const FontClass = new ClassAttributor('font', 'ql-font', config); |
|
class FontStyleAttributor extends StyleAttributor { |
|
value(node) { |
|
return super.value(node).replace(/["']/g, ''); |
|
} |
|
} |
|
const FontStyle = new FontStyleAttributor('font', 'font-family', config); |
|
export { FontStyle, FontClass }; |
|
//# sourceMappingURL=font.js.map
|