-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
[BUG] Codeblock + Codemirror plugins - Delete icon not disabled when edit mode is disabled #602
Comments
I also have this issue. Using: const plugins = [
// Other plugins
codeBlockPlugin(),
codeMirrorPlugin({
codeBlockLanguages: {
// ...
},
codeMirrorExtensions: [
EditorState.readOnly.of(true), // Code Mirror readonly configured
EditorView.editable.of(false)
]
}),
];
// and...
export const Example: FunctionComponent = () => {
// imagine cool blog content with a triple backtick code block
const blogContent = '';
return (
<MDXEditor
markdown={blogContent}
readOnly <!-- Read Only editor -->
plugins={plugins} />
)
}; I also see this issue. Looking at the code, I assume these are the relevant lines editor/src/plugins/codemirror/CodeMirrorEditor.tsx Lines 90 to 120 in 0ab6746
Looks like the |
🎉 This issue has been resolved in version 3.22.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Despite the editor "edit" mode being disabled, the "delete" button of the code block remains active.
The text was updated successfully, but these errors were encountered: