Improve editor user experience (no longer WYSIWYG, fixed bugs, added view vs. edit distinction) #3
1 changed files with 0 additions and 4 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue