diff --git a/src/components/tiptap.js b/src/components/tiptap.js index 1640eae..be83ceb 100644 --- a/src/components/tiptap.js +++ b/src/components/tiptap.js @@ -1,6 +1,6 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import { Editor, StarterKit, Placeholder, OrderedList, BulletList, ListItem, Underline, Link } from '../tiptap-exports' +import { Editor, StarterKit, Placeholder, Underline, Link } from '../tiptap-exports' import { toolbarButtons, @@ -63,16 +63,15 @@ export default class TiptapEditor extends React.Component { Placeholder.configure({ placeholder: this.props.placeholder, }), - BulletList, - OrderedList, - ListItem, Dropcap ], content: this.props.content, + autofocus: !this.props.content, onUpdate: ({ editor }) => { this.props.onContentChanged(editor.getHTML()); }, onSelectionUpdate: this.onSelect, + onBlur: this.onBlur, editorProps: { handleKeyDown: (view, e) => { return this.captureReturn(e) @@ -235,9 +234,9 @@ export default class TiptapEditor extends React.Component { handleLinkShortcut(e) { if (e.which === 75 && (e.ctrlKey || e.metaKey)) { e.preventDefault(); - const selection = this.tiptap.editor.selection; + const selection = this.tiptap.state.selection; if (selection && !selection.empty) { - this.handleCommand('link', 'toogleLink'); + this.handleCommand('link', 'toggleLink'); } } } diff --git a/src/demo.js b/src/demo.js index 7719bdc..f154c46 100644 --- a/src/demo.js +++ b/src/demo.js @@ -25,6 +25,10 @@ var initBlock = [{ type: "text", data: `

The Indian singles shuttlers were handed a tough road for the upcoming Badminton World Championships in the draws announced by BWF on Thursday.

PV Sindhu, who will be the only Indian woman singles shuttler in action, in the global event has been seeded a lowly 16th out of the total 48 players for the competition.

Though the former world champion has received a bye for the first round, she will have to face off against former World Champion Nozomi Okuhara in her opening match. Should Sindhu beat Okuhara, she will have to face world No 7 Ratchanok Intanon of Thailand.

If the Indian wins the contest, then she will have to face-off against world number 1 and top seed An Se Young in the pre-quarter-finals.

In the men’s singles section, ninth-seeded HS Prannoy is slated to face seventh seed Loh Kean Yew in the pre-quarter-finals if he wins his first two matches in the 64-player competition. If the 31-year-old advances further, he might have to go up against the reigning world champion Viktor Axelsen in the quarter-finals.

Lakshya Sen, seeded 11th, is drawn to face world No 3 Kunlavut Vitidsran in the pre-quarter-finals and China’s Lu Shi Feng or Lu Guang Zu in the quarter-finals.

The unseeded Kidambi Srikanth, on the other hand, will have to go past Japan’s Kenta Nishimoto in the very first round. He also has the second seeded Anthony Ginting (pre-quarters) and fifth seeded Jonatan Christie (quarter-finals) in his side of the draw.

Byes for Satwik-Chirag, Treesa-Gayatri

Meanwhile in the doubles section, the second seeded men’s doubles pair of Satwiksairaj Rankireddy and Chirag Shetty have been handed a bye in the first round. They will open their campaign against the winner of the clash between Australia’s Kenneth Choo/Ming Lim and Ireland’s Joshua Magee and Paul Reynolds.

Similarly, the pair of Treesa Jolly and Gayatri Gopichand will start their campaign directly in the second round against either Chang Ching Hui/Yang Ching Tun or Kati-Kreet Marran/Helina Ruutel.

The All England Open semi-finalists will, however, run into the top seed Chen Qing Chen and Jia Yi Fan of China in the very next round.

The other women’s doubles pair of Ashwini Bhat and Shikha Gautam will have to face Netherland’s Debora Jille and Cheryl Seinen in the opening round.

In the mixed doubles section, Rohan Kapoor and Sikki Reddy will have to the Scottish pair of beat Adam Hall and Julie MacPherson, while Venkat Prasad and Juhi Dewangan will have to overcome the challenge posed by the pair of Jones Ralfy Jansen and Linda Efler.

`, key: Kattappa.uuid() +}, { + type: "text", + data: '', + key: Kattappa.uuid() }]; const { Blocks, Editor } = Kattappa; diff --git a/src/tiptap-exports.js b/src/tiptap-exports.js index c2bed58..ccab1e8 100644 --- a/src/tiptap-exports.js +++ b/src/tiptap-exports.js @@ -1,9 +1,6 @@ export { Editor } from '@tiptap/core' export { default as StarterKit } from '@tiptap/starter-kit' export { default as Placeholder } from '@tiptap/extension-placeholder' -export { default as OrderedList } from '@tiptap/extension-ordered-list' -export { default as BulletList } from '@tiptap/extension-bullet-list' -export { default as ListItem } from '@tiptap/extension-list-item' export { default as Underline } from '@tiptap/extension-underline' export { default as Link } from '@tiptap/extension-link' export { Extension, Mark } from '@tiptap/core' diff --git a/vite.tiptap-exports.config.js b/vite.tiptap-exports.config.js index f49902c..a2e4a0d 100644 --- a/vite.tiptap-exports.config.js +++ b/vite.tiptap-exports.config.js @@ -14,6 +14,6 @@ export default defineConfig({ output: { dir: path.resolve(path.dirname(''), 'lib'), }, - }, + } }, });