enh: note versioning

This commit is contained in:
Timothy Jaeryang Baek
2025-05-05 01:35:43 +04:00
parent e8b23ef0c1
commit 463ac99e39
4 changed files with 199 additions and 21 deletions
@@ -43,6 +43,7 @@
export let json = false;
export let raw = false;
export let editable = true;
export let preserveBreaks = false;
export let generateAutoCompletion: Function = async () => null;
@@ -58,6 +59,16 @@
throwOnError: false
};
$: if (editor) {
editor.setOptions({
editable: editable
});
}
$: if (value === null && html !== null && editor) {
editor.commands.setContent(html);
}
// Function to find the next template in the document
function findNextTemplate(doc, from = 0) {
const patterns = [{ start: '{{', end: '}}' }];