Linkify plugin - Link is disabled inside editor
See original GitHub issueI guess Link is disabled (not working when clicked) inside editor by default in Draft.js. But how to make it clickable using linkify plugin? I think we can add something like this in the anchor tag:
`<a onClick={onClick} href={link}>`
where onClick
event will redirect to the url location. I’ve edited the index.js file in Link folder with something like this:
var openWindow = function(){
window.open(href, target);
};
return _react2.default.createElement('a', _extends({}, props, {
href: href,
className: combinedClassName,
target: target,
onClick: openWindow
}));
One more thing, Should I use the saved raw content to display in editor as rich text content?
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (6 by maintainers)
Top Results From Across the Web
How to use the draft-js-linkify-plugin function in draft-js ... - Snyk
To help you get started, we've selected a few draft-js-linkify-plugin examples, ... import Editor from 'draft-js-plugins-editor'; // eslint-disable-line ...
Read more >Enable left click in edit mode for linkify plugin for draftjs
I was trying draft-js-linkify-plugin for creating a simple rich text editor. I have a requirement that link should be clickable while I am ......
Read more >Linkify - DraftJS Plugins - High quality plugins with great UX
It is important to import the Editor which accepts plugins. import Editor from ... In this case, only the linkifyPlugin // is passed...
Read more >How I disable a “Link” function on the editor? - WordPress.org
wpDiscuz allows you to hide/show certain text formatting buttons of the comment rich editor. Just click on the corresponding buttons to disable or...
Read more >User and Workspace Settings - Visual Studio Code
Workbench: Color Customizations setting with Edit in settings.json link ... off: The editor will never be optimized for usage with a Screen Reader....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i make the link clickable in the editor with
and i remove contentState because of #398
@nikgraf I have a similar problem as the original poster. You wrote:
My use-case is that the editor is always in edit mode (think Evernote for example). I would like to enable the user to Ctrl+Click a link to open it. Could you recommend a strategy to implement this?