Skip to content

Commit

Permalink
Fix editable CodeBlock (#2239)
Browse files Browse the repository at this point in the history
* Set editable in codemirror EditorView

* Bump @codemirror/view version for readOnly bug patch
  • Loading branch information
laurakwhit authored Jul 29, 2024
1 parent 944162d commit a638bce
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"@codemirror/language": "^6.10.2",
"@codemirror/legacy-modes": "^6.4.0",
"@codemirror/state": "^6.4.1",
"@codemirror/view": "^6.28.5",
"@codemirror/view": "^6.29.0",
"@crownframework/svelte-error-boundary": "^1.0.3",
"@fontsource-variable/inter": "^5.0.8",
"@fontsource/noto-sans-mono": "^5.0.9",
Expand Down
20 changes: 10 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/lib/holocene/code-block.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
indentOnInput(),
bracketMatching(),
EditorState.readOnly.of(!editable),
EditorView.editable.of(editable),
EditorView.contentAttributes.of({ 'aria-label': label }),
];
Expand Down

0 comments on commit a638bce

Please sign in to comment.