mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-22 08:07:50 +08:00
31 lines
537 B
TypeScript
31 lines
537 B
TypeScript
import { createExtension } from '@tiptap/core'
|
|
import {
|
|
emDash,
|
|
ellipsis,
|
|
openDoubleQuote,
|
|
closeDoubleQuote,
|
|
openSingleQuote,
|
|
closeSingleQuote,
|
|
} from 'prosemirror-inputrules'
|
|
|
|
const Typography = createExtension({
|
|
addInputRules() {
|
|
return [
|
|
emDash,
|
|
ellipsis,
|
|
openDoubleQuote,
|
|
closeDoubleQuote,
|
|
openSingleQuote,
|
|
closeSingleQuote,
|
|
]
|
|
},
|
|
})
|
|
|
|
export default Typography
|
|
|
|
declare module '@tiptap/core/src/Editor' {
|
|
interface AllExtensions {
|
|
Typography: typeof Typography,
|
|
}
|
|
}
|