Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ const router = createBrowserRouter([
</NormalLayout>
),
},
{
path: "test",
element: (
<NormalLayout>
<Test />
</NormalLayout>
),
},
{
path: "/",
element: (
Expand Down
102 changes: 50 additions & 52 deletions ui/src/components/nodes/Rich.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ import {
} from "@remirror/react";
import { WysiwygEditor } from "@remirror/react-editors/wysiwyg";
import { FloatingToolbar } from "@remirror/react";
import { AllStyledComponent } from "@remirror/styles/emotion";
import { TableExtension } from "@remirror/extension-react-tables";
import { GenIcon, IconBase } from "@remirror/react-components";
import "remirror/styles/all.css";

import { htmlToProsemirrorNode } from "remirror";
import { styled } from "@mui/material";
Expand Down Expand Up @@ -211,58 +211,56 @@ const MyEditor = ({
ref={ref}
overflow="auto"
>
<AllStyledComponent>
<ThemeProvider>
<MyStyledWrapper>
<Remirror
manager={manager}
// initialContent={state}
state={state}
editable={!isGuest}
// FIXME: onFocus is not working
onChange={(parameter) => {
let nextState = parameter.state;
setState(nextState);
// TODO sync with DB and yjs
if (parameter.tr?.docChanged) {
setPodContent({ id, content: nextState.doc.toJSON() });
}
}}
>
{/* <WysiwygToolbar /> */}
<EditorComponent />
<TableComponents />
<ThemeProvider>
<MyStyledWrapper>
<Remirror
manager={manager}
// initialContent={state}
state={state}
editable={!isGuest}
// FIXME: onFocus is not working
onChange={(parameter) => {
let nextState = parameter.state;
setState(nextState);
// TODO sync with DB and yjs
if (parameter.tr?.docChanged) {
setPodContent({ id, content: nextState.doc.toJSON() });
}
}}
>
{/* <WysiwygToolbar /> */}
<EditorComponent />
<TableComponents />

{!isGuest && (
<FloatingToolbar>
<CommandButtonGroup>
{/* <HeadingLevelButtonGroup /> */}
{/* <VerticalDivider /> */}
<FormattingButtonGroup />
{/* <ListButtonGroup /> */}
<SetHighlightButton color="lightpink" />
<SetHighlightButton color="yellow" />
<SetHighlightButton color="lightgreen" />
<SetHighlightButton color="lightcyan" />
<SetHighlightButton />
</CommandButtonGroup>
{/* <DecreaseIndentButton /> */}
{/* <IncreaseIndentButton /> */}
{/* <TextAlignmentButtonGroup /> */}
{/* <IndentationButtonGroup /> */}
{/* <BaselineButtonGroup /> */}
</FloatingToolbar>
)}
{!isGuest && (
<FloatingToolbar positioner="emptyBlockStart">
<HeadingLevelButtonGroup />
</FloatingToolbar>
)}
{/* <Menu /> */}
</Remirror>
</MyStyledWrapper>
</ThemeProvider>
</AllStyledComponent>
{!isGuest && (
<FloatingToolbar>
<CommandButtonGroup>
{/* <HeadingLevelButtonGroup /> */}
{/* <VerticalDivider /> */}
<FormattingButtonGroup />
{/* <ListButtonGroup /> */}
<SetHighlightButton color="lightpink" />
<SetHighlightButton color="yellow" />
<SetHighlightButton color="lightgreen" />
<SetHighlightButton color="lightcyan" />
<SetHighlightButton />
</CommandButtonGroup>
{/* <DecreaseIndentButton /> */}
{/* <IncreaseIndentButton /> */}
{/* <TextAlignmentButtonGroup /> */}
{/* <IndentationButtonGroup /> */}
{/* <BaselineButtonGroup /> */}
</FloatingToolbar>
)}
{!isGuest && (
<FloatingToolbar positioner="emptyBlockStart">
<HeadingLevelButtonGroup />
</FloatingToolbar>
)}
{/* <Menu /> */}
</Remirror>
</MyStyledWrapper>
</ThemeProvider>
</Box>
);
};
Expand Down
1 change: 0 additions & 1 deletion ui/src/lib/store/canvasSlice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import {
ReactFlowInstance,
} from "reactflow";
import { node } from "prop-types";
import { fixTables } from "@remirror/pm/dist-types/tables";

// TODO add node's data typing.
type NodeData = {
Expand Down