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

Noneditable element is editable when selection.setContent is applied #5095

Open
vctormb opened this issue Jun 20, 2019 · 2 comments

Comments

@vctormb
Copy link

commented Jun 20, 2019

What is the current behavior?
I'm using the noneditable plugin to not be able to edit elements with a specific class.
If I use setContent to append a new element with a noneditable class it doesn't work. The noneditable content only works if I set it through initialValue prop.

Please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox.io or similar.
https://codesandbox.io/s/tinymcereact-di17r

What is the expected behavior?
To not be able to edit the content when I use setContent to append an element with a noneditable class.

Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or tinymce-react?

I'm using:

  • @tinymce/tinymce-react: 3.1.1
  • tinymce: 5.0.7
@SimonFc

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2019

This seems to be a bug with the content not being parsed correctly. It works alright if you use editor.insertContent instead so that's a possible workaround for you until we have a fix for this.

(This is actually a bug with TinyMCE though but we can let this one be here)

@SimonFc SimonFc transferred this issue from tinymce/tinymce-react Jul 26, 2019

@SimonFc

This comment has been minimized.

Copy link
Contributor

commented Jul 26, 2019

Actually it's confusing to have it at tinymce/tinymce-react, transfering to tinymce/tinymce:)

@lnewson lnewson changed the title Noneditable element is editable when setContent is applied Noneditable element is editable when selection.setContent is applied Aug 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.