Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: headline is not extracted from html lists, tables etc

thecodrrfa97ce04ff02
diff --git a/packages/core/content-types/tiny.js b/packages/core/content-types/tiny.js
index 6e2ca52c8..6516aba21 100644
--- a/packages/core/content-types/tiny.js
+++ b/packages/core/content-types/tiny.js
@@ -17,7 +17,7 @@ class Tiny {
toTXT() {
if (window.DOMParser) {
let doc = new DOMParser().parseFromString(this.data, "text/html");
- return doc.body.textContent || "";
+ return (doc.body || doc.firstElementChild).textContent || "";
} else {
return decode(
this.data.replace(/<br[^>]*>/gi, "\n").replace(/<[^>]+>/g, "")