Skip to content
Snippets Groups Projects
Commit 8e6cd3ba authored by chris's avatar chris
Browse files

move marks to services

parent e4a13bc0
No related branches found
No related tags found
1 merge request!418move marks to services
Showing
with 32 additions and 15 deletions
const strong = {
const strongMark = {
parseDOM: [
{ tag: 'strong' },
// This works around a Google Docs misbehavior where
......@@ -15,4 +15,4 @@ const strong = {
},
};
export default strong;
export default strongMark;
import { Service } from 'wax-prosemirror-core';
import { subscriptMark } from 'wax-prosemirror-schema';
import subscriptMark from './schema/subscriptMark';
import Subscript from './Subscript';
import './subscript.css';
......
const subscriptMark = {
excludes: 'superscript',
parseDOM: [{ tag: 'sub' }, { style: 'vertical-align=sub' }],
toDOM(hook, next) {
hook.value = ['sub'];
next();
},
};
export default subscriptMark;
import { Service } from 'wax-prosemirror-core';
import { superscriptMark } from 'wax-prosemirror-schema';
import superscriptMark from './schema/superscriptMark';
import Superscript from './Superscript';
import './superscript.css';
......
const superscriptMark = {
excludes: 'subscript',
parseDOM: [{ tag: 'sup' }, { style: 'vertical-align=super' }],
toDOM: (hook, next) => {
hook.value = ['sup'];
next();
},
};
export default superscriptMark;
import { Service } from 'wax-prosemirror-core';
import { toggleMark } from 'prosemirror-commands';
import { underlineMark } from 'wax-prosemirror-schema';
import underlineMark from './schema/underlineMark';
import Underline from './Underline';
class UnderlineService extends Service {
......
const underline = {
const underlineMark = {
parseDOM: [{ tag: 'u' }],
toDOM: (hook, next) => {
// eslint-disable-next-line no-param-reassign
......@@ -7,4 +7,4 @@ const underline = {
},
};
export default underline;
export default underlineMark;
import { Service } from 'wax-prosemirror-core';
import { LinkComponent } from 'wax-prosemirror-components';
import { linkMark } from 'wax-prosemirror-schema';
import linkMark from './schema/linkMark';
import LinkTool from './LinkTool';
import linkRule from './LinkInputRule';
......
const link = {
const linkMark = {
attrs: {
href: { default: null },
rel: { default: '' },
......@@ -29,4 +29,4 @@ const link = {
},
};
export default link;
export default linkMark;
import { Service } from 'wax-prosemirror-core';
import {
mathDisplayNode,
mathInlineNode,
mathSelectMark,
} from 'wax-prosemirror-schema';
import { mathDisplayNode, mathInlineNode } from 'wax-prosemirror-schema';
import mathSelectMark from './schema/mathSelectMark';
import mathPlugin from './plugins/math-plugin';
import mathSelectPlugin from './plugins/math-select';
import inlineInputRule from './InlineInputRule';
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment