feat: support markdown
This commit is contained in:
parent
bd230ddd4f
commit
85d144a1e9
34 changed files with 2350 additions and 4 deletions
15
ui/components/Markdown/context/context.tsx
Normal file
15
ui/components/Markdown/context/context.tsx
Normal file
|
@ -0,0 +1,15 @@
|
|||
import React from "react";
|
||||
import type { ReactMarkdownViewModel } from "./viewmodel";
|
||||
|
||||
export interface INodeRendererContext {
|
||||
readonly viewmodel: ReactMarkdownViewModel;
|
||||
}
|
||||
|
||||
export const NodeRendererContextType = React.createContext<INodeRendererContext>(
|
||||
null as unknown as INodeRendererContext,
|
||||
);
|
||||
NodeRendererContextType.displayName = "NodeRendererContextType";
|
||||
|
||||
export const useNodeRendererContext = (): INodeRendererContext => {
|
||||
return React.useContext(NodeRendererContextType);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue