Improved copy function with rich text
This commit is contained in:
@@ -339,7 +339,10 @@ export async function db_save_ae_obj_li__journal_entry(
|
||||
}
|
||||
|
||||
let content = obj.content ?? '';
|
||||
let content_md_html: null|string = marked.parse(content);
|
||||
// remove the most common zerowidth characters from the start of the file
|
||||
let content_cleaned: string = content.replace(/^[\u200B\u200C\u200D\u200E\u200F\uFEFF]/,"");
|
||||
let content_md_html: null|string = await marked.parse(content_cleaned ?? '') ?? null;
|
||||
// let content_md_html_alt: null|string = await marked.parse(content_cleaned ?? '', { gfm: false }) ?? null;
|
||||
|
||||
try {
|
||||
const id_random = await db_journals.journal_entry.put({
|
||||
@@ -378,6 +381,7 @@ export async function db_save_ae_obj_li__journal_entry(
|
||||
|
||||
content: obj.content,
|
||||
content_md_html: content_md_html,
|
||||
// content_md_html_alt: content_md_html_alt,
|
||||
content_html: obj.content_html,
|
||||
content_json: obj.content_json,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user