-
Notifications
You must be signed in to change notification settings - Fork 19
Description
This is not an issue; this is documentation.
Formatting an embed
![[<embed_arguments>]]
There are three embed_arguments, and they must appear in the order listed below. Each argument must be separated by the pipe character |.
- Required:
<tldraw_markdown_file>: This must be a valid tldraw file you created. - Optional:
<alt_text>: Controls the appearance of the tldraw file - Optional:
<embed_size>: Controls the size of the embed without affecting the tldraw file bounds
Thus, we have the following configurations possible:
![[<tldraw_markdown_file>]]
![[<tldraw_markdown_file>|<alt_text>]]
![[<tldraw_markdown_file>|<embed_size>]]
![[<tldraw_markdown_file>|<alt_text>|<embed_size>]]
Do not include the
<and>brackets in the arguments
Using <alt_text>
size,pos,showBg,pagefields are available to use in the "alt" text of the embed,size=<width>,<height>: Sets the bounds of the embed within the tldraw filepos=<x_offset>,<y_offset>: Sets the position to start the embed within the tldraw fileposfield is optional whensizeis providedshowBg=<value>: Controls whether to show the solid color background of the tldraw file<value>is eitheryes,no,true, orfalse
page=<pageId>see comment- separate each field with
;, e.g.size=1280,720;pos=500,20;showBg=yes
Example:
If you have an embed called my-embed.md you could do ![[my-embed.md|pos=525,185;size=100,120]] where the "alt" text is pos=525,185;size=100,120. Note that there is a semicolon separating the two fields.
Using <embed_size>
<width>x<height>
Example:
If you have an embed called my-embed.md you could do ![[my-embed.md|200x100]]. Note that there is an x separating the two numbers.
Feature demos
Live updates
Screencast.from.2024-10-13.08-40-46.mp4
Set embed size
Screencast.from.2024-10-13.08-53-12.mp4
Set bounds on embed
Automatically via the interactive mode
Screencast.From.2024-11-11.17-39-36.mp4
Manually setting bounds
- Show embed menu and enter interactive mode (right click or tap and hold on mobile)
- Adjust the embed
- Exit interact mode
- Show embed menu and select "Copy bounds"
- Paste into the alt text portion of the embed link