feat: support markdown

This commit is contained in:
guanghechen 2024-07-10 16:17:23 +08:00
parent bd230ddd4f
commit 85d144a1e9
34 changed files with 2350 additions and 4 deletions

View 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);
};