This commit is contained in:
Zsolt Viczian
2021-09-29 06:50:51 +02:00
parent 7b1f13391c
commit e8a29a2715
3 changed files with 9 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
{
"id": "obsidian-excalidraw-plugin",
"name": "Excalidraw",
"version": "1.3.14",
"version": "1.3.15",
"minAppVersion": "0.12.0",
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
"author": "Zsolt Viczian",

View File

@@ -143,7 +143,12 @@ export class ExcalidrawData {
let parts;
while(!(parts = res.next()).done) {
const text = data.substring(position,parts.value.index);
this.textElements.set(parts.value[1],{raw: text, parsed: await this.parse(text)});
const id:string = parts.value[1];
this.textElements.set(id,{raw: text, parsed: await this.parse(text)});
//this will set the rawText field of text elements imported from files before 1.3.14, and from other instances of Excalidraw
const textEl = this.scene.elements.filter((el:any)=>el.id===id)[0];
if(textEl && (!textEl.rawText || textEl.rawText === "")) textEl.rawText = text;
position = parts.value.index + BLOCKREF_LEN;
}
@@ -241,7 +246,7 @@ export class ExcalidrawData {
dirty = true;
} else if(!this.textElements.has(id)) {
dirty = true;
const raw = (te.rawText!==""?te.rawText:te.text); //this is for compatibility with drawings created before the rawText change on ExcalidrawTextElement
const raw = (te.rawText && te.rawText!==""?te.rawText:te.text); //this is for compatibility with drawings created before the rawText change on ExcalidrawTextElement
this.textElements.set(id,{raw: raw, parsed: null});
this.parseasync(id,raw);
}

View File

@@ -1,3 +1,3 @@
{
"1.3.14": "0.11.13"
"1.3.15": "0.11.13"
}