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.
26 lines
552 B
26 lines
552 B
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
|
|
}
|
|
|