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

[4.x] Fix markdown and code fieldtype read-only modes #9764

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Mar 20, 2024

This pull request fixes an issue with the Markdown fieldtype where you could edit the content even when the field was locked.

This was happening due to the readOnly state on the CoreMirror instance only being set when the fieldtype is being mounted. Changes to the readOnly prop weren't updating the CoreMirror state.

This PR also fixes an issue where the "Mode" dropdown was usable even when the Code Fieldtype was read-only.

Fixes statamic/collaboration#76.

@jasonvarga jasonvarga changed the title [4.x] Collaboration: Fix editable markdown field when locked [4.x] Fix markdown and code fieldtype read-only modes Mar 20, 2024
@jasonvarga jasonvarga merged commit 37cea63 into 4.x Mar 20, 2024
35 checks passed
@jasonvarga jasonvarga deleted the fix/editable-markdown-field-when-locked branch March 20, 2024 21:39
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

Successfully merging this pull request may close these issues.

Locked and greyed-out markdown fields are still editable by other users
2 participants