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 ab26117 commit 15ac2f9
Show file tree
Hide file tree
Showing 3 changed files with 272 additions and 11 deletions.
245 changes: 245 additions & 0 deletions src/dg-testVault/Excalidraw/with image.excalidraw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
---

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: [[Pasted Image 20231001193851_191.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": "xLCfYA181PLMQOr4GpXRA",
"type": "image",
"x": -298.1578581600502,
"y": -662.5382584199751,
"width": 701.734375,
"height": 701.734375,
"angle": 0,
"strokeColor": "transparent",
"backgroundColor": "transparent",
"fillStyle": "hachure",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"groupIds": [],
"frameId": null,
"roundness": null,
"seed": 532576954,
"version": 41,
"versionNonce": 754323834,
"isDeleted": false,
"boundElements": null,
"updated": 1696271547891,
"link": null,
"locked": false,
"status": "pending",
"fileId": "f5de7e7b9672dcaec815dbbc90d72635f638da20",
"scale": [
1,
1
]
},
{
"type": "image",
"version": 69,
"versionNonce": 1515571706,
"isDeleted": true,
"id": "4X3oj80QhxGi-LbzjhaMj",
"fillStyle": "hachure",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -293.0406706600502,
"y": -625.0374543399498,
"strokeColor": "transparent",
"backgroundColor": "transparent",
"width": 701.734375,
"height": 701.734375,
"seed": 813415782,
"groupIds": [],
"frameId": null,
"roundness": null,
"boundElements": [],
"updated": 1696271539727,
"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": 339.0289519100502,
"scrollY": 2238.311695919975,
"zoom": {
"value": 0.2
},
"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]]

30 changes: 19 additions & 11 deletions src/test/snapshot/snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ This means this file should be in the root directory :)

This subfolder also contains path rewrite testing!

==========
P Plugins/PE Excalidraw/PE2 excalidraw with image.md
==========
---
{"dg-publish":true,"permalink":"/p-plugins/pe-excalidraw/pe-2-excalidraw-with-image/"}
---


<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":"image","version":144,"versionNonce":1399055314,"isDeleted":false,"id":"I9p-EcgYj99u1_tTTKOPK","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"angle":0,"x":-142.36787742989952,"y":-268.4733461798995,"strokeColor":"transparent","backgroundColor":"transparent","width":349.8607548597991,"height":349.8607548597991,"seed":171994450,"groupIds":[],"frameId":null,"roundness":null,"boundElements":[],"updated":1696178350656,"link":null,"locked":false,"status":"pending","fileId":"f5de7e7b9672dcaec815dbbc90d72635f638da20","scale":[1,1]},{"id":"etjlThVL","type":"text","x":-87.19921875,"y":99.1875,"width":120.55990600585938,"height":25,"angle":0,"strokeColor":"#1e1e1e","backgroundColor":"transparent","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"groupIds":[],"frameId":null,"roundness":null,"seed":1087805266,"version":17,"versionNonce":1765827278,"isDeleted":false,"boundElements":null,"updated":1696178356575,"link":null,"locked":false,"text":"tis an image","rawText":"tis an image","fontSize":20,"fontFamily":1,"textAlign":"left","verticalAlign":"top","baseline":18,"containerId":null,"originalText":"tis an image","lineHeight":1.25},{"id":"Pu1GJH4c","type":"text","x":-149.30078125,"y":152.25390625,"width":310.2197265625,"height":25,"angle":0,"strokeColor":"#1e1e1e","backgroundColor":"transparent","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"groupIds":[],"frameId":null,"roundness":null,"seed":1793030738,"version":91,"versionNonce":1701927762,"isDeleted":false,"boundElements":null,"updated":1696178434561,"link":null,"locked":false,"text":"it's not uploaded automatically","rawText":"it's not uploaded automatically","fontSize":20,"fontFamily":1,"textAlign":"left","verticalAlign":"top","baseline":18,"containerId":null,"originalText":"it's not uploaded automatically","lineHeight":1.25},{"id":"m40NMLqr","type":"text","x":-130.09765625,"y":232.0859375,"width":220.039794921875,"height":25,"angle":0,"strokeColor":"#1e1e1e","backgroundColor":"transparent","fillStyle":"hachure","strokeWidth":1,"strokeStyle":"solid","roughness":1,"opacity":100,"groupIds":[],"frameId":null,"roundness":null,"seed":546057938,"version":23,"versionNonce":2137370830,"isDeleted":false,"boundElements":null,"updated":1696178440853,"link":null,"locked":false,"text":"this is a bug of sorts","rawText":"this is a bug of sorts","fontSize":20,"fontFamily":1,"textAlign":"left","verticalAlign":"top","baseline":18,"containerId":null,"originalText":"this is a bug of sorts","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":189,"scrollY":410.8671875,"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("with_imageexcalidraw.md1");ReactDOM.render(React.createElement(App),excalidrawWrapper);})();</script>
==========
P Plugins/PE Excalidraw/PE1 Transcluded excalidraw.md
==========
Expand Down Expand Up @@ -79,9 +88,8 @@ I'm a list of all files in this folder:
- [[P Plugins/PD Dataview/PD0 - note with summary\|PD0 - note with summary]]
- [[P Plugins/PD Dataview/PD1 Dataview\|PD1 Dataview]]
- [[P Plugins/PD Dataview/PD2 Inline queries\|PD2 Inline queries]]
- [[P Plugins/PE Excalidraw/PE1 Embedded excalidraw\|PE1 Embedded excalidraw]]
- [[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 @@ -300,6 +308,15 @@ Hello! I'm a pinned note (should be at the top yeah!)
[Custom permalink](https://dg-docs.ole.dev/advanced/note-specific-settings/)


==========
006 Custom title.md
==========
---
{"dg-publish":true,"permalink":"/006-custom-title/","title":"006 THIS IS A CUSTOM TITLE"}
---

[Custom title](https://dg-docs.ole.dev/advanced/note-specific-settings/)

==========
005 Custom filters.md
==========
Expand All @@ -314,15 +331,6 @@ this plugin has custom filter that turns 🌞 (snow emoji) into 🌞 (THE SUN).

🌞🌞🌞🌞🌞🌞🌞🌞🌞🌞🌞🌞🌞

==========
006 Custom title.md
==========
---
{"dg-publish":true,"permalink":"/006-custom-title/","title":"006 THIS IS A CUSTOM TITLE"}
---

[Custom title](https://dg-docs.ole.dev/advanced/note-specific-settings/)

==========
004 Publishing this garden.md
==========
Expand Down

0 comments on commit 15ac2f9

Please sign in to comment.