mirror of
https://github.com/zsviczian/obsidian-excalidraw-plugin.git
synced 2025-08-06 05:46:28 +00:00
2.14.1-beta-2, 0.18.0-27
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "obsidian-excalidraw-plugin",
|
"id": "obsidian-excalidraw-plugin",
|
||||||
"name": "Excalidraw",
|
"name": "Excalidraw",
|
||||||
"version": "2.14.1-beta-1",
|
"version": "2.14.1-beta-2",
|
||||||
"minAppVersion": "1.5.7",
|
"minAppVersion": "1.5.7",
|
||||||
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
|
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
|
||||||
"author": "Zsolt Viczian",
|
"author": "Zsolt Viczian",
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@popperjs/core": "^2.11.8",
|
"@popperjs/core": "^2.11.8",
|
||||||
"@zsviczian/excalidraw": "0.18.0-26",
|
"@zsviczian/excalidraw": "0.18.0-27",
|
||||||
"chroma-js": "^3.1.2",
|
"chroma-js": "^3.1.2",
|
||||||
"clsx": "^2.0.0",
|
"clsx": "^2.0.0",
|
||||||
"@zsviczian/colormaster": "^1.2.2",
|
"@zsviczian/colormaster": "^1.2.2",
|
||||||
|
|||||||
@@ -262,6 +262,7 @@ export const FRONTMATTER_KEYS:{[key:string]: {name: string, type: string, depric
|
|||||||
"iframe-theme": {name: "excalidraw-iframe-theme", type: "text", depricated: true},
|
"iframe-theme": {name: "excalidraw-iframe-theme", type: "text", depricated: true},
|
||||||
"embeddable-theme": {name: "excalidraw-embeddable-theme", type: "text"},
|
"embeddable-theme": {name: "excalidraw-embeddable-theme", type: "text"},
|
||||||
"open-as-markdown": {name: "excalidraw-open-md", type: "checkbox"},
|
"open-as-markdown": {name: "excalidraw-open-md", type: "checkbox"},
|
||||||
|
"embed-as-markdown": {name: "excalidraw-embed-md", type: "checkbox"},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CaptureUpdateAction = {
|
export const CaptureUpdateAction = {
|
||||||
|
|||||||
@@ -710,7 +710,7 @@ const isTextOnlyEmbed = (internalEmbedEl: Element):boolean => {
|
|||||||
if(!src) return true; //technically this does not mean this is a text only embed, but still should abort further processing
|
if(!src) return true; //technically this does not mean this is a text only embed, but still should abort further processing
|
||||||
const fnameParts = getEmbeddedFilenameParts(src);
|
const fnameParts = getEmbeddedFilenameParts(src);
|
||||||
return !(fnameParts.hasArearef || fnameParts.hasGroupref || fnameParts.hasFrameref || fnameParts.hasClippedFrameref) &&
|
return !(fnameParts.hasArearef || fnameParts.hasGroupref || fnameParts.hasFrameref || fnameParts.hasClippedFrameref) &&
|
||||||
(fnameParts.hasBlockref || fnameParts.hasSectionref)
|
(fnameParts.hasBlockref || fnameParts.hasSectionref) && fnameParts.blockref !== "as-image"
|
||||||
}
|
}
|
||||||
|
|
||||||
const tmpObsidianWYSIWYG = async (
|
const tmpObsidianWYSIWYG = async (
|
||||||
@@ -724,6 +724,9 @@ const tmpObsidianWYSIWYG = async (
|
|||||||
const file = app.vault.getAbstractFileByPath(ctx.sourcePath);
|
const file = app.vault.getAbstractFileByPath(ctx.sourcePath);
|
||||||
if(!(file instanceof TFile)) return;
|
if(!(file instanceof TFile)) return;
|
||||||
if(!plugin.isExcalidrawFile(file)) return;
|
if(!plugin.isExcalidrawFile(file)) return;
|
||||||
|
if(ctx.frontmatter?.["excalidraw-embed-md"]) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
if (ctx.remainingNestLevel < 4) {
|
if (ctx.remainingNestLevel < 4) {
|
||||||
|
|||||||
@@ -419,7 +419,8 @@ FILENAME_HEAD: "Filename",
|
|||||||
SHOW_DRAWING_OR_MD_IN_HOVER_PREVIEW_DESC:
|
SHOW_DRAWING_OR_MD_IN_HOVER_PREVIEW_DESC:
|
||||||
"...even if the file has the <b>excalidraw-open-md: true</b> frontmatter key.<br>" +
|
"...even if the file has the <b>excalidraw-open-md: true</b> frontmatter key.<br>" +
|
||||||
"When this setting is off and the file is set to open in md by default, the hover preview will show the " +
|
"When this setting is off and the file is set to open in md by default, the hover preview will show the " +
|
||||||
"markdown side of the document.",
|
"markdown side of the document.<br>" +
|
||||||
|
"Note: <b>excalidraw-open-md</b> is different from <b>excalidraw-embed-md</b>. If <b>excalidraw-embed-md</b> is set to true, the hover preview will always show the markdown side, regardless of this setting. To force image rendering when embedding, use <code>![[drawing#^as-image]]</code> in your markdown file.",
|
||||||
SHOW_DRAWING_OR_MD_IN_READING_MODE_NAME: "Render as image when in markdown reading mode of an Excalidraw file",
|
SHOW_DRAWING_OR_MD_IN_READING_MODE_NAME: "Render as image when in markdown reading mode of an Excalidraw file",
|
||||||
SHOW_DRAWING_OR_MD_IN_READING_MODE_DESC:
|
SHOW_DRAWING_OR_MD_IN_READING_MODE_DESC:
|
||||||
"When you are in markdown reading mode (aka. reading the back side of the drawing) should the Excalidraw drawing be rendered as an image? " +
|
"When you are in markdown reading mode (aka. reading the back side of the drawing) should the Excalidraw drawing be rendered as an image? " +
|
||||||
|
|||||||
@@ -19,8 +19,10 @@ I build this plugin in my free time, as a labor of love. Curious about the philo
|
|||||||
`,
|
`,
|
||||||
"2.14.1":`
|
"2.14.1":`
|
||||||
## New
|
## New
|
||||||
|
- New frontmatter option \`excalidraw-embed-md\`. When set to \`true\`, embedding this Excalidraw file into another markdown file will display its markdown content (the "back of the note") instead of rendering it as an image.
|
||||||
|
- If you want to always display the drawing as an image, even when \`excalidraw-embed-md\` is enabled, use the special embed syntax: \`![[drawing#^as-image]]\`. Here, \`as-image\` is a phantom block reference that forces image rendering.
|
||||||
- Added Spanish translation by [@Joakim31](https://github.com/Joakim31) [#2425](https://github.com/zsviczian/obsidian-excalidraw-plugin/pull/2425)
|
- Added Spanish translation by [@Joakim31](https://github.com/Joakim31) [#2425](https://github.com/zsviczian/obsidian-excalidraw-plugin/pull/2425)
|
||||||
- Incremental minor updates from the main Excalidraw project.
|
- Incremental minor updates from the main [Excalidraw project](https://github.com/excalidraw/excalidraw).
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
- Styling issues impacting native Obsidian search/replace dialogs. [#2420](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2420)
|
- Styling issues impacting native Obsidian search/replace dialogs. [#2420](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2420)
|
||||||
|
|||||||
@@ -1067,6 +1067,13 @@ export const FRONTMATTER_KEYS_INFO: SuggesterInfo[] = [
|
|||||||
desc: "If this key is present the file will be opened as a markdown file in the editor",
|
desc: "If this key is present the file will be opened as a markdown file in the editor",
|
||||||
after: ": true",
|
after: ": true",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: "embed-md",
|
||||||
|
code: null,
|
||||||
|
desc: "If this key is present, when embedding the ![[image]] into a markdown document, it will be embedded as markdown, not as an image.\n" +
|
||||||
|
"If however you embed ![[image#^as-image]], i.e. you reference the 'as-image' block, then the image will be embedded as an image.",
|
||||||
|
after: ": true",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: "autoexport",
|
field: "autoexport",
|
||||||
code: null,
|
code: null,
|
||||||
|
|||||||
Reference in New Issue
Block a user