mirror of
https://github.com/zsviczian/obsidian-excalidraw-plugin.git
synced 2025-08-06 05:46:28 +00:00
1.1.7
This commit is contained in:
@@ -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]]`, ``, `` 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]]`, ``, ``, etc. You get the idea.
|
||||
|
||||
### Detailed release notes are under the How to videos.
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>'+
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"1.1.6": "0.11.13"
|
||||
"1.1.7": "0.11.13"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user