Skip to content

Commit

Permalink
video recorder fix
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Aug 26, 2023
1 parent 410a2d9 commit 736fd2d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
19 changes: 19 additions & 0 deletions packages/dante3/docs/renderer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,23 @@ That’s what the `Renderer` is for. It’s a helper function which renders HTML
</State>
```

### Video Recorder

```js live=true
<State initial={{ data: "" }}>
{({ state, setState }) => (
<div className="break-words">
<Renderer raw={
{"type":"doc","content":[{"type":"VideoRecorderBlock","attrs":{
"url": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
"src":null,
"width":"","height":"","loading":false,"loading_progress":0,"caption":null,"direction":"center","file":null},"content":[{"type":"text","text":"kokokk"}]}]}
}/>
</div>
)}
</State>
```




4 changes: 2 additions & 2 deletions packages/dante3/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dante3",
"description": "Dante3 is a text editor built on top of TipTap",
"version": "1.2.7",
"version": "1.2.8",
"main": "package/Dante.cjs.js",
"jsnext:main": "package/Dante.es.js",
"module": "package/Dante.es.js",
Expand Down Expand Up @@ -79,4 +79,4 @@
"react": "18.2.0",
"react-dom": "18.2.0"
}
}
}
2 changes: 1 addition & 1 deletion packages/dante3/src/renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function Renderer({raw, html, theme, domain} : RendererProps) {
return (
<FileBlockRenderer blockKey={node.id} data={node.attrs} domain={domain}/>
)
case 'VideoRecorder':
case 'VideoRecorderBlock':
return <VideoRecorderRenderer blockKey={node.id} data={node.attrs} domain={domain}/>

case 'paragraph':
Expand Down
2 changes: 1 addition & 1 deletion packages/dante3/src/styled/base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const EditorContainer = styled.div`
font-size: ${(props: any) => props.theme.dante_editor_font_size};
line-height: ${(props: any) => props.theme.dante_editor_line_height};
color: ${(props: any) => props.theme.dante_text_color };
background-color: ${(props: any) => props.theme.dante_bg_color};
// background-color: ${(props: any) => props.theme.dante_bg_color};
text-rendering: optimizeLegibility;
Expand Down

0 comments on commit 736fd2d

Please sign in to comment.