question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to set readonly mode

See original GitHub issue

What is the current behavior?

Missing or undocumented API for setting readonly mode.

What is the expected behavior?

A way to toggle readonly mode

I’ve followed the example for the react integration https://www.tiny.cloud/docs/integrations/react/

But now I would like a button on the page to toggle the editor from readonly to edit mode. Is there a way to do this? I found this resource, but it doesn’t work https://www.tiny.cloud/docs-3x/reference/configuration/Configuration3x@readonly/
In codesandbox: https://codesandbox.io/s/tinymcereact-fqwj8?file=/src/index.js

I’ve also tried using window.tinymce.activeEditor.mode.set('readonly'); to set readonly, but it has no effect.

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 am using react": “16.13.1” and @tinymce/tinymce-react": "^3.6.0 in Chrome.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
tiny-jamescommented, Sep 9, 2020

Hi kaplantm,

As already pointed out the correct method to set TinyMCE as readonly in the react integration is to use the disabled prop.

The documentation is here: https://www.tiny.cloud/docs/integrations/react/#disabled

0reactions
jackle23commented, Aug 10, 2022

hi Tiny-James, how can I set disable, but my user still can comment?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Impossible to disabled the read-only mode on a folder
Try this: 1. Right-click on the folder and click Properties; 2. Then click on the Security tab, and click on Edit; 3. In...
Read more >
How to Fix Folder Keeps Reverting to Read Only on Windows 10
Once the Settings are opened, navigate to Update & Security and then click on Windows Security. Restart your computer completely and then check ......
Read more >
Fix Folder Keeps Reverting to Read Only with 3 Easy Tips
If a folder reverts to read only in Windows 10, first change the permissions, and then change the attributes of that certain folder....
Read more >
How to Fix Folders Reverting to Read-Only Mode in Windows ...
Your folders revert to read-only mode for various reasons, including restrictions imposed by your administrator, an issue with a recent Windows ...
Read more >
Read-Only Mode - CKEditor 4 Documentation
When the editor goes from the editable into the read-only state, its readOnly property is being set to true (for read-only mode) or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found