Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get it working. Tokenization not happening. #25

Open
pReya opened this issue Mar 20, 2019 · 2 comments
Open

Can't get it working. Tokenization not happening. #25

pReya opened this issue Mar 20, 2019 · 2 comments

Comments

@pReya
Copy link

pReya commented Mar 20, 2019

Hello everyone,

unfortunately I can't get the decorator to work, no matter what I do. Yes, I've seen the other issues and I've also set the defaultSyntax property. However, the decorator isn't even tokenizing the content, so it's not a css/display problem. I am under the impression, this might have to do with me using react-draft-wysiwyg. Any help would be appreciated. Maybe @mxstbr has an idea?

I've put a little demo of my problem in this sandbox: https://codesandbox.io/embed/k5zp1p297v

@pReya pReya changed the title Can't get it working with react-draft-wysiwyg Can't get it working. Tokenization not happening. Mar 20, 2019
@Philjutsu
Copy link

Bump for the same issue with similar code. @pReya did you get this figured out 3 months back?

@Philjutsu
Copy link

Philjutsu commented Jul 2, 2019

@pReya I just figure this one out, the react-draft-wysiwyg Editor component is the issue. I switched to the Editor from draftjs itself and everything works fine. Even tried it with your sandbox example. When you console log the editorState it shows the decorator in the immutable object. When it goes through the react-draft-wysiwyg Editor component it is overwritten. Simple fix is to use the Editor from Draftjs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants