The current implementation of our Link decorator is as follows (majority is taken directly from the draftjs documentation):
|
this.decorator = new CompositeDecorator([linkDecorator]); |
where linkDecorator is the following:
https://github.com/synapsestudios/draftjs-editor/blob/f033dd1402a484809c3c0a272e05642677079f89/src/decorators/link.jsx
On multiple projects– we've had issues with users needing a differentation between opening internal links (react-router Link) vs. external (a tag, target blank, rel noopener noreferrer). The most recent implementation involved creating a new link decorator, extending the draftjs editor, and overriding the default in the constructor.
I think it would be beneficial to provide an easier/out-of-the-box solution for the way we handle links.
cc @tdboone– as he was the most recent to implement an override at the project-level.
The current implementation of our Link decorator is as follows (majority is taken directly from the draftjs documentation):
draftjs-editor/src/DraftJSEditor.jsx
Line 25 in f033dd1
where linkDecorator is the following:
https://github.com/synapsestudios/draftjs-editor/blob/f033dd1402a484809c3c0a272e05642677079f89/src/decorators/link.jsx
On multiple projects– we've had issues with users needing a differentation between opening internal links (react-router
Link) vs. external (atag, target blank, rel noopener noreferrer). The most recent implementation involved creating a new link decorator, extending the draftjs editor, and overriding the default in the constructor.I think it would be beneficial to provide an easier/out-of-the-box solution for the way we handle links.
cc @tdboone– as he was the most recent to implement an override at the project-level.