This commit is contained in:
Zsolt Viczian
2021-05-27 21:39:53 +02:00
parent 6174e45c3f
commit 5bbe90182d
6 changed files with 12 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ The Obsidian-Excalidraw plugin integrates [Excalidraw](https://excalidraw.com/),
Thank you for updating to Excalidraw 1.1.x!
I have improved how drawings are embedded! You no longer need an Excalidraw codeblock. You can now embed drawings just like any other images: `![[my drawing.excalidraw]]` or `![[my drawing.excalidraw|500|left]]` or `![[my drawing.excalidraw|right-wrap]]`, `![alttext|500|right](drawing.excalidraw)`, `![](folder/drawing.excalidraw)` etc. You get the idea.
I have improved how drawings are embedded! You no longer need an Excalidraw codeblock. You can now embed drawings just like any other images: `![[my drawing.excalidraw]]` or `![[my drawing.excalidraw|500|left]]` or `![[my drawing.excalidraw|right-wrap]]`, `![alttext|500|right](drawing.excalidraw)`, `![](folder/drawing.excalidraw)`, etc. You get the idea.
### Detailed release notes are under the How to videos.

View File

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

View File

@@ -142,6 +142,13 @@ export default class ExcalidrawView extends TextFileView {
new Notice('File name cannot contain any of the following characters: * " \\  < > : | ?',4000);
return;
}
if (!ev.shiftKey) {
const file = this.app.metadataCache.getFirstLinkpathDest(text,this.file.path);
if (!file) {
new Notice("File does not exist. Hold down SHIFT (or CTRL+SHIFT) and click link button to create.", 4000);
return;
}
}
try {
this.app.workspace.openLinkText(text,this.file.path,ev.ctrlKey||ev.metaKey);
} catch (e) {

View File

@@ -145,6 +145,7 @@ export default class ExcalidrawPlugin extends Plugin {
fwidth = drawing.getAttribute("width");
fheight = drawing.getAttribute("height");
alt = drawing.getAttribute("alt");
if(alt == fname) alt = ""; //when the filename starts with numbers followed by a space Obsidian recognizes the filename as alt-text
divclass = "excalidraw-svg";
if(alt) {
//for some reason ![]() is rendered in a DIV and ![[]] in a span by Obsidian

View File

@@ -93,7 +93,7 @@ export class ExcalidrawSettingTab extends PluginSettingTab {
await this.plugin.saveSettings();
}));
this.containerEl.createEl('h1', {text: 'New darwing filename'});
this.containerEl.createEl('h1', {text: 'New drawing filename'});
containerEl.createDiv('',(el) => {
el.innerHTML = '<p>The automatically generated filename consists of a prefix and a date. ' +
'e.g."Drawing 2021-05-24 12.58.07".</p>'+

View File

@@ -1,3 +1,3 @@
{
"1.1.6": "0.11.13"
"1.1.7": "0.11.13"
}