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
1 changed files with 0 additions and 4 deletions
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) { export function makeEditor(divSelector, value) {
let div = document.querySelector(divSelector); let div = document.querySelector(divSelector);
div.classList.remove("hidden");
div.classList.remove("h-0");
let documentTheme = EditorView.theme({ let documentTheme = EditorView.theme({
"&": { "&": {
@ -38,7 +36,5 @@ export function makeEditor(divSelector, value) {
textarea.value = view.state.doc.toString() textarea.value = view.state.doc.toString()
}) })
// remove the "hidden" and "h-0" classes from the div
return view return view
} }