diff --git a/src/components/QuasarTiptap.vue b/src/components/QuasarTiptap.vue index 31de1c0..9f73da0 100644 --- a/src/components/QuasarTiptap.vue +++ b/src/components/QuasarTiptap.vue @@ -64,7 +64,6 @@ import { OParagraph, OBlockquote, OTodoItem, - OAlign, OAlignment, OIndent, OLineHeight, @@ -197,7 +196,6 @@ export default { node: 'paragraph', notAfter: ['paragraph'] }), - new OAlign() ] this.editor = new Editor({ diff --git a/src/extentions/Align.js b/src/extentions/Align.js deleted file mode 100644 index 0cc4b00..0000000 --- a/src/extentions/Align.js +++ /dev/null @@ -1,43 +0,0 @@ -import { markInputRule } from 'tiptap-commands' -import { Mark } from 'tiptap' -import { applyMark } from 'src/utils/mark' - -export default class Align extends Mark { - get name () { - return 'align' - } - - get schema () { - return { - attrs: { - textAlign: { - default: 'left' - } - }, - parseDOM: [ - { - style: 'text-align', - getAttrs: value => ({ textAlign: value }) - } - ], - toDOM: mark => ['span', { style: `text-align: ${mark.attrs.textAlign}; display: block` }, 0] - } - } - - commands ({ type }) { - return attrs => (state, dispatch) => { - let { tr } = state - tr = applyMark(state.tr.setSelection(state.selection), type, attrs) - if (tr.docChanged || tr.storedMarksSet) { - dispatch && dispatch(tr) - return true - } - } - } - - inputRules ({ type }) { - return [ - markInputRule(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/, type) - ] - } -} diff --git a/src/extentions/index.js b/src/extentions/index.js index 98b4cb2..9731609 100644 --- a/src/extentions/index.js +++ b/src/extentions/index.js @@ -27,7 +27,6 @@ export { default as OForeColor } from 'src/extentions/ForeColor' export { default as OFontFamily } from 'src/extentions/FontFamily' // Extensions -export { default as OAlign } from 'src/extentions/Align' export { default as OAlignment } from 'src/extentions/Alignment' export { default as OIndent } from 'src/extentions/Indent' export { default as OLineHeight } from 'src/extentions/LineHeight'