Skip to content

Commit c8ea467

Browse files
committed
feat: integrate Terminal component into CustomEmbeddableRenderer
- Updated renderCustomEmbeddable function to include support for the new Terminal component. - Added case handling for 'terminal' to render the Terminal interface when the corresponding link is detected. - Enhanced user experience by providing additional embedding options within the application.
1 parent 3499421 commit c8ea467

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/frontend/src/CustomEmbeddableRenderer.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
ControlButton,
1010
HtmlEditor,
1111
Editor,
12+
Terminal,
1213
} from './pad';
1314
import { ActionButton } from './pad/buttons';
1415
import "./CustomEmbeddableRenderer.scss";
@@ -20,6 +21,7 @@ export const renderCustomEmbeddable = (
2021
) => {
2122

2223
if (element.link && element.link.startsWith('!')) {
24+
2325
let path = element.link.split('!')[1];
2426
let content;
2527
let title;
@@ -28,10 +30,15 @@ export const renderCustomEmbeddable = (
2830
case 'html':
2931
content = <HtmlEditor element={element} appState={appState} excalidrawAPI={excalidrawAPI} />;
3032
title = "HTML Editor";
33+
break;
3134
case 'editor':
3235
content = <Editor element={element} appState={appState} excalidrawAPI={excalidrawAPI} />;
3336
title = "Code Editor";
3437
break;
38+
case 'terminal':
39+
content = <Terminal element={element} appState={appState} excalidrawAPI={excalidrawAPI} />;
40+
title = "Terminal";
41+
break;
3542
case 'state':
3643
content = <StateIndicator />;
3744
title = "State Indicator";

0 commit comments

Comments
 (0)