mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-19 18:35:18 +02:00
embed tweets
This commit is contained in:
parent
8737605666
commit
e3d2a0988b
7 changed files with 87 additions and 63 deletions
|
|
@ -194,14 +194,14 @@ Displays an image with optional alt text and caption.
|
|||
- \`caption\` (optional): Caption displayed below the image
|
||||
|
||||
### Embed Block
|
||||
Embeds external content (YouTube videos, Figma designs, or generic links).
|
||||
Embeds external content (YouTube videos, Figma designs, tweets, or generic links).
|
||||
\`\`\`embed
|
||||
{"provider": "youtube", "url": "https://www.youtube.com/watch?v=VIDEO_ID", "caption": "Video title"}
|
||||
\`\`\`
|
||||
- \`provider\` (required): \`"youtube"\`, \`"figma"\`, or \`"generic"\`
|
||||
- \`provider\` (required): \`"youtube"\`, \`"figma"\`, \`"tweet"\`, or \`"generic"\`
|
||||
- \`url\` (required): Full URL to the content
|
||||
- \`caption\` (optional): Caption displayed below the embed
|
||||
- YouTube and Figma render as iframes; generic shows a link card
|
||||
- YouTube and Figma render as iframes; tweet renders inline from the tweet URL; generic shows a link card
|
||||
|
||||
### Iframe Block
|
||||
Embeds an arbitrary web page or a locally-served dashboard in the note.
|
||||
|
|
|
|||
|
|
@ -190,9 +190,9 @@ Use for: charts, screenshots, photos you have a URL or workspace path for.
|
|||
|
||||
Required: \`src\` (URL or workspace path). Optional: \`alt\`, \`caption\`.
|
||||
|
||||
## \`embed\` — YouTube / Figma embed (JSON)
|
||||
## \`embed\` — YouTube / Figma / Tweet embed (JSON)
|
||||
|
||||
Use for: linking to a video or design that should render inline.
|
||||
Use for: linking to a video, design, or tweet that should render inline.
|
||||
|
||||
\`\`\`embed
|
||||
{
|
||||
|
|
@ -202,7 +202,7 @@ Use for: linking to a video or design that should render inline.
|
|||
}
|
||||
\`\`\`
|
||||
|
||||
Required: \`provider\` ("youtube" | "figma" | "generic"), \`url\`. Optional: \`caption\`.
|
||||
Required: \`provider\` ("youtube" | "figma" | "tweet" | "generic"), \`url\`. Optional: \`caption\`.
|
||||
|
||||
## \`iframe\` — arbitrary embedded webpage (JSON)
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export const ImageBlockSchema = z.object({
|
|||
export type ImageBlock = z.infer<typeof ImageBlockSchema>;
|
||||
|
||||
export const EmbedBlockSchema = z.object({
|
||||
provider: z.enum(['youtube', 'figma', 'generic']),
|
||||
provider: z.enum(['youtube', 'figma', 'tweet', 'generic']),
|
||||
url: z.string().url(),
|
||||
caption: z.string().optional(),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue