From 74961ff11807e77976a04535c3848715b1ce4e1b Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Thu, 17 Jun 2021 17:51:22 +0200 Subject: [PATCH] Make DOMParser correctly return innerHTML --- ts/editor/codable.ts | 2 +- ts/editor/editingArea.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ts/editor/codable.ts b/ts/editor/codable.ts index b1fe27e6a..c0d78a6a6 100644 --- a/ts/editor/codable.ts +++ b/ts/editor/codable.ts @@ -42,6 +42,6 @@ export class Codable extends HTMLTextAreaElement { this.codeMirror = undefined; const doc = parser.parseFromString(this.value, "text/html"); - return doc.documentElement.textContent!; + return doc.documentElement.innerHTML; } } diff --git a/ts/editor/editingArea.ts b/ts/editor/editingArea.ts index 301403c59..5d217aee9 100644 --- a/ts/editor/editingArea.ts +++ b/ts/editor/editingArea.ts @@ -128,9 +128,7 @@ export class EditingArea extends HTMLDivElement { toggleHtmlEdit(): void { const output = this.codable.toggle(this.fieldHTML); - console.log("succ output", output, this.ord); if (output) { - console.log("writo"); this.fieldHTML = output; } }