Improve editor user experience (no longer WYSIWYG, fixed bugs, added view vs. edit distinction) #3

Merged
nicole merged 4 commits from editor-ux into main 2024-06-03 14:56:15 +00:00
Showing only changes of commit 74f4ab8380 - Show all commits

View file

@ -5,8 +5,6 @@ import {markdown} from "@codemirror/lang-markdown"
export function makeEditor(divSelector, value) {
let div = document.querySelector(divSelector);
div.classList.remove("hidden");
div.classList.remove("h-0");
let documentTheme = EditorView.theme({
"&": {
@ -38,7 +36,5 @@ export function makeEditor(divSelector, value) {
textarea.value = view.state.doc.toString()
})
// remove the "hidden" and "h-0" classes from the div
return view
}