diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-06-06 17:01:18 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-06-06 17:01:18 +0300 |
commit | 66ae668cd0abf5213475231e4a4057d9df2eccf1 (patch) | |
tree | ff213038f0ba59322b83b2ddf3337d905c2f93cd /src/marks | |
parent | 68152421cdfac78c664cfc6365427004684ce1a2 (diff) |
Fix conflict handling in tiptap
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src/marks')
-rw-r--r-- | src/marks/Bold.js | 0 | ||||
-rw-r--r-- | src/marks/index.js | 47 |
2 files changed, 47 insertions, 0 deletions
diff --git a/src/marks/Bold.js b/src/marks/Bold.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/src/marks/Bold.js diff --git a/src/marks/index.js b/src/marks/index.js new file mode 100644 index 000000000..3466a0fac --- /dev/null +++ b/src/marks/index.js @@ -0,0 +1,47 @@ +/* + * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net> + * + * @author Julius Härtl <jus@bitgrid.net> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +import { Bold, Italic as TipTapItalic } from 'tiptap-extensions' + +/** + * This file maps prosemirror mark names to tiptap classes, + * so we can reuse the prosemirror-markdown default parser for now + */ + +class Strong extends Bold { + get name() { + return 'strong' + } +} + +class Italic extends TipTapItalic { + get name() { + return 'em' + } +} + +/** Strike is currently unsupported by prosemirror-markdown */ + +export { + Strong, + Italic +} |