5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 07:16:21 +00:00

pedirle al navegador que use <p>

This commit is contained in:
void 2020-11-09 15:25:06 -03:00
parent 7b4392d1a5
commit 774cfdbf76

View file

@ -317,6 +317,9 @@ function cleanNode (node, contentEl) {
} }
function setupEditor (editorEl) { function setupEditor (editorEl) {
// XXX: ¡Esto afecta a todo el documento! ¿Quizás usar un iframe para el editor?
document.execCommand('defaultParagraphSeparator', false, 'p')
const contentEl = editorEl.querySelector(".editor-content") const contentEl = editorEl.querySelector(".editor-content")
contentEl.addEventListener("keydown", event => { contentEl.addEventListener("keydown", event => {