How to allow target attribute on links? #306
-
filterEditorState() is changing my links to "target="_self". How do I prevent this behavior? Code example below. I added "target" to the list of attributes but this has no effect.
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hey @Hereward 👋 I think it would be useful to look at the content before and after the filtering to understand what might be going on. As far as I know the filters shouldn't change the values of any attributes – they just remove them if they aren't in the Could you share the output of the following:
|
Beta Was this translation helpful? Give feedback.
-
Hi & thanks for replying. To save time I have simply removed attributes from the entity type altogether. This solves my problem. I am using the react-draft-wysiwyg package so it's possible that there are other manipulations getting in the way. I have had a number of issues trying to use your filter with that package and this is the more minor of the problems. |
Beta Was this translation helpful? Give feedback.
-
If I have time I will try to document all the issues I've encountered integrating this with react-draft-wysiwyg. |
Beta Was this translation helpful? Give feedback.
-
👍 cool! I don't have personal experience with react-draft-wysiwyg unfortunately, but if you want to share those problems I'm happy to help if I can. Ideally the filters should work with any and all Draft.js editors, if that's not the case we could consider adding more documentation or introducing more configuration if needed. Will close this now, can reopen if you retry this and can further pinpoint the problem. |
Beta Was this translation helpful? Give feedback.
👍 cool! I don't have personal experience with react-draft-wysiwyg unfortunately, but if you want to share those problems I'm happy to help if I can. Ideally the filters should work with any and all Draft.js editors, if that's not the case we could consider adding more documentation or introducing more configuration if needed.
Will close this now, can reopen if you retry this and can further pinpoint the problem.