1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
| import { kebabCase } from 'uni-shared'
|
| export default function (Quill) {
| const { Scope, Attributor } = Quill.import('parchment')
| const text = [{
| name: 'lineHeight',
| scope: Scope.BLOCK
| }, {
| name: 'letterSpacing',
| scope: Scope.INLINE
| }, {
| name: 'textDecoration',
| scope: Scope.INLINE
| }, {
| name: 'textIndent',
| scope: Scope.BLOCK
| }]
| const result = {}
| text.forEach(({ name, scope }) => {
| result[`formats/${name}`] = new Attributor.Style(name, kebabCase(name), {
| scope
| })
| })
|
| return result
| }
|
|