How can I add the LinkExtension to the WysiwygEditor in remirror?

65 views Asked by At

I am evaluating remirror as a rich text editor in web application. It looks extremely promising. The included WysiwygEditor component is very close to exactly what I am looking for.

At a minimum though I would need to add the LinkExtension, along with a button to the toolbar. However, I cannot figure out how to achieve this.

My first attempt involved copying the source code to WysiwygEditor and creating my own MyEditor that was setup exactly like it, but with the addition of the LinkExtension with autoLink enabled. This did in fact get the automatic link handling working.

However, the keyboard shortcut cause the edit dialog to display, and then immediately be hidden.

My ideal solution, of course, would be to use the existing component and add in the necessary extension and button. Is this possible?

I am imaginging something like:

const extraExtensions = [new LinkExtension({autoLink: true});

return <WysiwygEditor placeHolder="Enter text..." extensions={extensions} />;
0

There are 0 answers