tinymce / tinymce-react

Offical TinyMCE React component
MIT License
937 stars 152 forks source link

Read only mode not work #477

Closed Sergey-lang closed 7 months ago

Sergey-lang commented 7 months ago

Preview mode does not work. The editor is still clickable and I can edit the content. mode: 'readonly', - didn't work readonly: true - didn't work

Mozila Firefox. Network Regular 4G (users with bad connection can't click on button because it's content for editing) image image

https://codesandbox.io/s/nervous-star-8fd7qj?file=/src/index.js

What is the expected behavior? I can't edit content. I can view the content as in preview mode . Click links and navigate as if I saw a normal page

the task is to show the content from the editor while maintaining the same formatting, styles, fonts as the usual page content

"tinymce": "^6.1.2", "@tinymce/tinymce-react": "^4.2.0", Chrome / Mozila

exalate-issue-sync[bot] commented 7 months ago

Internal Ref: INT-3249

danoaky-tiny commented 7 months ago

The property you're looking for is disabled.

You can see an example of how it works here: Storybook, and source code

Diveafall commented 5 months ago

What is the purpose of the readonly property inside init of you can still edit?

danoaky-tiny commented 4 months ago

@Diveafall See https://www.tiny.cloud/docs/tinymce/6/react-ref/#init Setting the readonly prop within init is overriden.

Diveafall commented 4 months ago

I understand. If the property doesn't do anything (is overridden anyway) I would prefer it not existing at all.