Skip to content

Commit

Permalink
testVault: add excalidraw with image
Browse files Browse the repository at this point in the history
  • Loading branch information
julesvirallinen committed Oct 2, 2023
1 parent 553698b commit be8f6fb
Show file tree
Hide file tree
Showing 3 changed files with 237 additions and 0 deletions.
212 changes: 212 additions & 0 deletions src/dg-testVault/Excalidraw/with image.excalidraw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
---

excalidraw-plugin: parsed
tags: [excalidraw]

---
==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠==


# Text Elements
tis an image ^etjlThVL

it's not uploaded automatically ^Pu1GJH4c

this is a bug of sorts ^m40NMLqr


# Embedded files
f5de7e7b9672dcaec815dbbc90d72635f638da20: [[travolta.png]]

%%
# Drawing
```json
{
"type": "excalidraw",
"version": 2,
"source": "https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/1.9.19",
"elements": [
{
"type": "text",
"version": 17,
"versionNonce": 1765827278,
"isDeleted": false,
"id": "etjlThVL",
"fillStyle": "hachure",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -87.19921875,
"y": 99.1875,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 120.55990600585938,
"height": 25,
"seed": 1087805266,
"groupIds": [],
"frameId": null,
"roundness": null,
"boundElements": [],
"updated": 1696178356575,
"link": null,
"locked": false,
"fontSize": 20,
"fontFamily": 1,
"text": "tis an image",
"rawText": "tis an image",
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
"originalText": "tis an image",
"lineHeight": 1.25,
"baseline": 18
},
{
"type": "text",
"version": 91,
"versionNonce": 1701927762,
"isDeleted": false,
"id": "Pu1GJH4c",
"fillStyle": "hachure",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -149.30078125,
"y": 152.25390625,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 310.2197265625,
"height": 25,
"seed": 1793030738,
"groupIds": [],
"frameId": null,
"roundness": null,
"boundElements": [],
"updated": 1696178434561,
"link": null,
"locked": false,
"fontSize": 20,
"fontFamily": 1,
"text": "it's not uploaded automatically",
"rawText": "it's not uploaded automatically",
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
"originalText": "it's not uploaded automatically",
"lineHeight": 1.25,
"baseline": 18
},
{
"type": "text",
"version": 23,
"versionNonce": 2137370830,
"isDeleted": false,
"id": "m40NMLqr",
"fillStyle": "hachure",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -130.09765625,
"y": 232.0859375,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 220.039794921875,
"height": 25,
"seed": 546057938,
"groupIds": [],
"frameId": null,
"roundness": null,
"boundElements": [],
"updated": 1696178440853,
"link": null,
"locked": false,
"fontSize": 20,
"fontFamily": 1,
"text": "this is a bug of sorts",
"rawText": "this is a bug of sorts",
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
"originalText": "this is a bug of sorts",
"lineHeight": 1.25,
"baseline": 18
},
{
"id": "HcrLXEvs44rS67hJzeV1v",
"type": "image",
"x": -175.90966796875,
"y": -266.54738451086945,
"width": 356.52173913043475,
"height": 356.52173913043475,
"angle": 0,
"strokeColor": "transparent",
"backgroundColor": "transparent",
"fillStyle": "hachure",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"groupIds": [],
"frameId": null,
"roundness": null,
"seed": 1427244047,
"version": 24,
"versionNonce": 350668687,
"isDeleted": false,
"boundElements": null,
"updated": 1696271725883,
"link": null,
"locked": false,
"status": "pending",
"fileId": "f5de7e7b9672dcaec815dbbc90d72635f638da20",
"scale": [
1,
1
]
}
],
"appState": {
"theme": "light",
"viewBackgroundColor": "#ffffff",
"currentItemStrokeColor": "#1e1e1e",
"currentItemBackgroundColor": "transparent",
"currentItemFillStyle": "hachure",
"currentItemStrokeWidth": 1,
"currentItemStrokeStyle": "solid",
"currentItemRoughness": 1,
"currentItemOpacity": 100,
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemTextAlign": "left",
"currentItemStartArrowhead": null,
"currentItemEndArrowhead": "arrow",
"scrollX": 156.7996136209239,
"scrollY": 234.79127038043467,
"zoom": {
"value": 1.1500000000000001
},
"currentItemRoundness": "round",
"gridSize": null,
"gridColor": {
"Bold": "#C9C9C9FF",
"Regular": "#EDEDEDFF"
},
"currentStrokeOptions": null,
"previousGridSize": null,
"frameRendering": {
"enabled": true,
"clip": true,
"name": true,
"outline": true
}
},
"files": {}
}
```
%%
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
dg-publish: true
---
#known-issue


![[with image.excalidraw]]

17 changes: 17 additions & 0 deletions src/test/snapshot/snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ I'm a list of all files in this folder:
- [[P Plugins/PD Dataview/PD1 Dataview\|PD1 Dataview]]
- [[P Plugins/PD Dataview/PD2 Inline queries\|PD2 Inline queries]]
- [[P Plugins/PE Excalidraw/PE1 Transcluded excalidraw\|PE1 Transcluded excalidraw]]
- [[P Plugins/PE Excalidraw/PE2 excalidraw with image\|PE2 excalidraw with image]]

{ .block-language-dataview}

Expand Down Expand Up @@ -485,6 +486,22 @@ P Plugins/PE Excalidraw/PE1 Transcluded excalidraw.md


<style> .container {font-family: sans-serif; text-align: center;} .button-wrapper button {z-index: 1;height: 40px; width: 100px; margin: 10px;padding: 5px;} .excalidraw .App-menu_top .buttonList { display: flex;} .excalidraw-wrapper { height: 800px; margin: 50px; position: relative;} :root[dir="ltr"] .excalidraw .layer-ui__wrapper .zen-mode-transition.App-menu_bottom--transition-left {transform: none;} </style><script src="https://cdn.jsdelivr.net/npm/react@17/umd/react.production.min.js"></script><script src="https://cdn.jsdelivr.net/npm/react-dom@17/umd/react-dom.production.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@excalidraw/excalidraw@0/dist/excalidraw.production.min.js"></script><div id="Drawing_2023-09-23_2241.09.excalidraw.md1"></div><script>(function(){const InitialData={"type":"excalidraw","version":2,"source":"https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/1.9.19","elements":[{"id":"CZsgDfedEqsrXkSK9gQJH","type":"rectangle","x":-231.33984375,"y":-252.75,"width":222,"height":93.296875,"angle":0,"strokeColor":"#1e1e1e","backgroundColor":"transparent","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"groupIds":[],"frameId":null,"roundness":{"type":3},"seed":834466567,"version":54,"versionNonce":1029562215,"isDeleted":false,"boundElements":[{"id":"ezIUrt6yrVW9zFYWBb6Fx","type":"arrow"}],"updated":1695498089101,"link":null,"locked":false},{"id":"SvNLuaih","type":"text","x":-179.35546875,"y":-209.0703125,"width":41.89994812011719,"height":25,"angle":0,"strokeColor":"#1e1e1e","backgroundColor":"transparent","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"groupIds":[],"frameId":null,"roundness":null,"seed":1422140583,"version":5,"versionNonce":655470793,"isDeleted":false,"boundElements":null,"updated":1695498085088,"link":null,"locked":false,"text":"beep","rawText":"beep","fontSize":20,"fontFamily":1,"textAlign":"left","verticalAlign":"top","baseline":18,"containerId":null,"originalText":"beep","lineHeight":1.25},{"id":"ezIUrt6yrVW9zFYWBb6Fx","type":"arrow","x":-8.67578125,"y":-157.16796875,"width":105.06640625,"height":109.1796875,"angle":0,"strokeColor":"#1e1e1e","backgroundColor":"transparent","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"groupIds":[],"frameId":null,"roundness":{"type":2},"seed":1011929737,"version":32,"versionNonce":1434943559,"isDeleted":false,"boundElements":null,"updated":1695498089101,"link":null,"locked":false,"points":[[0,0],[105.06640625,109.1796875]],"lastCommittedPoint":null,"startBinding":{"elementId":"CZsgDfedEqsrXkSK9gQJH","focus":-0.4142254509017335,"gap":2.28515625},"endBinding":null,"startArrowhead":null,"endArrowhead":"arrow"},{"id":"DCQM7O8k","type":"text","x":112.515625,"y":-27.84375,"width":42.17994689941406,"height":25,"angle":0,"strokeColor":"#1e1e1e","backgroundColor":"transparent","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"groupIds":[],"frameId":null,"roundness":null,"seed":358308487,"version":5,"versionNonce":1560033513,"isDeleted":false,"boundElements":null,"updated":1695498093145,"link":null,"locked":false,"text":"boop","rawText":"boop","fontSize":20,"fontFamily":1,"textAlign":"left","verticalAlign":"top","baseline":18,"containerId":null,"originalText":"boop","lineHeight":1.25},{"id":"rN0xD5d1otB0Txp8mrVKE","type":"rectangle","x":94.73046875,"y":-44.63671875,"width":76.48046875,"height":59.0703125,"angle":0,"strokeColor":"#1e1e1e","backgroundColor":"transparent","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"groupIds":[],"frameId":null,"roundness":{"type":3},"seed":1024447145,"version":54,"versionNonce":1399780105,"isDeleted":false,"boundElements":null,"updated":1695498097327,"link":null,"locked":false},{"id":"EAi6LVWi5tLJIMLTDPXa7","type":"line","x":93.21875,"y":24.30078125,"width":80.23046875,"height":83.078125,"angle":0,"strokeColor":"#1e1e1e","backgroundColor":"transparent","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"groupIds":[],"frameId":null,"roundness":{"type":2},"seed":795411751,"version":27,"versionNonce":309139625,"isDeleted":false,"boundElements":null,"updated":1695498103612,"link":null,"locked":false,"points":[[0,0],[-80.23046875,83.078125]],"lastCommittedPoint":null,"startBinding":null,"endBinding":null,"startArrowhead":null,"endArrowhead":null},{"id":"LIzHXsQpdg5HRqdFJywOn","type":"rectangle","x":-90.056640625,"y":115.9765625,"width":103,"height":59,"angle":0,"strokeColor":"#1e1e1e","backgroundColor":"transparent","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"groupIds":[],"frameId":null,"roundness":{"type":3},"seed":611720073,"version":64,"versionNonce":2050110535,"isDeleted":false,"boundElements":[{"type":"text","id":"ASLeSCTL"}],"updated":1695498114978,"link":null,"locked":false},{"id":"ASLeSCTL","type":"text","x":-64.65660858154297,"y":132.9765625,"width":52.19993591308594,"height":25,"angle":0,"strokeColor":"#1e1e1e","backgroundColor":"transparent","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"groupIds":[],"frameId":null,"roundness":null,"seed":1398305225,"version":6,"versionNonce":1100335623,"isDeleted":false,"boundElements":null,"updated":1695498114039,"link":null,"locked":false,"text":"bebop","rawText":"bebop","fontSize":20,"fontFamily":1,"textAlign":"center","verticalAlign":"middle","baseline":18,"containerId":"LIzHXsQpdg5HRqdFJywOn","originalText":"bebop","lineHeight":1.25}],"appState":{"theme":"light","viewBackgroundColor":"#ffffff","currentItemStrokeColor":"#1e1e1e","currentItemBackgroundColor":"transparent","currentItemFillStyle":"hachure","currentItemStrokeWidth":1,"currentItemStrokeStyle":"solid","currentItemRoughness":1,"currentItemOpacity":100,"currentItemFontFamily":1,"currentItemFontSize":20,"currentItemTextAlign":"left","currentItemStartArrowhead":null,"currentItemEndArrowhead":"arrow","scrollX":339,"scrollY":360.9765625,"zoom":{"value":1},"currentItemRoundness":"round","gridSize":null,"gridColor":{"Bold":"#C9C9C9FF","Regular":"#EDEDEDFF"},"currentStrokeOptions":null,"previousGridSize":null,"frameRendering":{"enabled":true,"clip":true,"name":true,"outline":true}},"files":{}};InitialData.scrollToContent=true;App=()=>{const e=React.useRef(null),t=React.useRef(null),[n,i]=React.useState({width:void 0,height:void 0});return React.useEffect(()=>{i({width:t.current.getBoundingClientRect().width,height:t.current.getBoundingClientRect().height});const e=()=>{i({width:t.current.getBoundingClientRect().width,height:t.current.getBoundingClientRect().height})};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[t]),React.createElement(React.Fragment,null,React.createElement("div",{className:"excalidraw-wrapper",ref:t},React.createElement(ExcalidrawLib.Excalidraw,{ref:e,width:n.width,height:n.height,initialData:InitialData,viewModeEnabled:!0,zenModeEnabled:!0,gridModeEnabled:!1})))},excalidrawWrapper=document.getElementById("Drawing_2023-09-23_2241.09.excalidraw.md1");ReactDOM.render(React.createElement(App),excalidrawWrapper);})();</script>
/img/user/A Assets/travolta.png
,/img/user/A Assets/unused_image.png
,/img/user/A Assets/travolta.webp
==========
P Plugins/PE Excalidraw/PE2 excalidraw with image.md
==========
---
{"dg-publish":true,"permalink":"/p-plugins/pe-excalidraw/pe-2-excalidraw-with-image/"}
---

#known-issue


<style> .container {font-family: sans-serif; text-align: center;} .button-wrapper button {z-index: 1;height: 40px; width: 100px; margin: 10px;padding: 5px;} .excalidraw .App-menu_top .buttonList { display: flex;} .excalidraw-wrapper { height: 800px; margin: 50px; position: relative;} :root[dir="ltr"] .excalidraw .layer-ui__wrapper .zen-mode-transition.App-menu_bottom--transition-left {transform: none;} </style><script src="https://cdn.jsdelivr.net/npm/react@17/umd/react.production.min.js"></script><script src="https://cdn.jsdelivr.net/npm/react-dom@17/umd/react-dom.production.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@excalidraw/excalidraw@0/dist/excalidraw.production.min.js"></script><div id="with_imageexcalidraw.md1"></div><script>(function(){const InitialData={"type":"excalidraw","version":2,"source":"https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/1.9.19","elements":[{"type":"text","version":17,"versionNonce":1765827278,"isDeleted":false,"id":"etjlThVL","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"angle":0,"x":-87.19921875,"y":99.1875,"strokeColor":"#1e1e1e","backgroundColor":"transparent","width":120.55990600585938,"height":25,"seed":1087805266,"groupIds":[],"frameId":null,"roundness":null,"boundElements":[],"updated":1696178356575,"link":null,"locked":false,"fontSize":20,"fontFamily":1,"text":"tis an image","rawText":"tis an image","textAlign":"left","verticalAlign":"top","containerId":null,"originalText":"tis an image","lineHeight":1.25,"baseline":18},{"type":"text","version":91,"versionNonce":1701927762,"isDeleted":false,"id":"Pu1GJH4c","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"angle":0,"x":-149.30078125,"y":152.25390625,"strokeColor":"#1e1e1e","backgroundColor":"transparent","width":310.2197265625,"height":25,"seed":1793030738,"groupIds":[],"frameId":null,"roundness":null,"boundElements":[],"updated":1696178434561,"link":null,"locked":false,"fontSize":20,"fontFamily":1,"text":"it's not uploaded automatically","rawText":"it's not uploaded automatically","textAlign":"left","verticalAlign":"top","containerId":null,"originalText":"it's not uploaded automatically","lineHeight":1.25,"baseline":18},{"type":"text","version":23,"versionNonce":2137370830,"isDeleted":false,"id":"m40NMLqr","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"angle":0,"x":-130.09765625,"y":232.0859375,"strokeColor":"#1e1e1e","backgroundColor":"transparent","width":220.039794921875,"height":25,"seed":546057938,"groupIds":[],"frameId":null,"roundness":null,"boundElements":[],"updated":1696178440853,"link":null,"locked":false,"fontSize":20,"fontFamily":1,"text":"this is a bug of sorts","rawText":"this is a bug of sorts","textAlign":"left","verticalAlign":"top","containerId":null,"originalText":"this is a bug of sorts","lineHeight":1.25,"baseline":18},{"id":"HcrLXEvs44rS67hJzeV1v","type":"image","x":-175.90966796875,"y":-266.54738451086945,"width":356.52173913043475,"height":356.52173913043475,"angle":0,"strokeColor":"transparent","backgroundColor":"transparent","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"groupIds":[],"frameId":null,"roundness":null,"seed":1427244047,"version":24,"versionNonce":350668687,"isDeleted":false,"boundElements":null,"updated":1696271725883,"link":null,"locked":false,"status":"pending","fileId":"f5de7e7b9672dcaec815dbbc90d72635f638da20","scale":[1,1]}],"appState":{"theme":"light","viewBackgroundColor":"#ffffff","currentItemStrokeColor":"#1e1e1e","currentItemBackgroundColor":"transparent","currentItemFillStyle":"hachure","currentItemStrokeWidth":1,"currentItemStrokeStyle":"solid","currentItemRoughness":1,"currentItemOpacity":100,"currentItemFontFamily":1,"currentItemFontSize":20,"currentItemTextAlign":"left","currentItemStartArrowhead":null,"currentItemEndArrowhead":"arrow","scrollX":156.7996136209239,"scrollY":234.79127038043467,"zoom":{"value":1.1500000000000001},"currentItemRoundness":"round","gridSize":null,"gridColor":{"Bold":"#C9C9C9FF","Regular":"#EDEDEDFF"},"currentStrokeOptions":null,"previousGridSize":null,"frameRendering":{"enabled":true,"clip":true,"name":true,"outline":true}},"files":{}};InitialData.scrollToContent=true;App=()=>{const e=React.useRef(null),t=React.useRef(null),[n,i]=React.useState({width:void 0,height:void 0});return React.useEffect(()=>{i({width:t.current.getBoundingClientRect().width,height:t.current.getBoundingClientRect().height});const e=()=>{i({width:t.current.getBoundingClientRect().width,height:t.current.getBoundingClientRect().height})};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[t]),React.createElement(React.Fragment,null,React.createElement("div",{className:"excalidraw-wrapper",ref:t},React.createElement(ExcalidrawLib.Excalidraw,{ref:e,width:n.width,height:n.height,initialData:InitialData,viewModeEnabled:!0,zenModeEnabled:!0,gridModeEnabled:!1})))},excalidrawWrapper=document.getElementById("with_imageexcalidraw.md1");ReactDOM.render(React.createElement(App),excalidrawWrapper);})();</script>


/img/user/A Assets/travolta.png
,/img/user/A Assets/unused_image.png
,/img/user/A Assets/travolta.webp
Expand Down

0 comments on commit be8f6fb

Please sign in to comment.