@yoopta/editor
Version:
<h2 align="center">Yoopta-Editor v1 🎉</h2> <p align="center">Yoopta-Editor - is an open source notion-like editor 💥</p> <div align="center"> <img width="574" alt="Screen Shot 2023-01-25 at 16 04 29" src="https://user-images.githubusercontent.com/2909311
37 lines • 1.55 kB
TypeScript
/// <reference types="react" />
import type { YooEditor, YooptaPathIndex } from '../../editor/types';
import type { PluginOptions } from '../../plugins/types';
export type YooptaEditorContext = {
editor: YooEditor;
};
export declare const YooptaContext: import("react").Context<YooptaEditorContext>;
/**
*
*/
declare const YooptaContextProvider: ({ children, editorState }: {
children: any;
editorState: any;
}) => import("react/jsx-runtime").JSX.Element;
declare const useYooptaEditor: () => YooEditor;
declare const useBlockData: (blockId: string) => import("../../editor/types").YooptaBlockData<import("slate").Descendant>;
declare const useYooptaFocused: () => boolean;
declare const useYooptaReadOnly: () => boolean;
declare const useYooptaPluginOptions: <TOptions>(pluginType: string) => Partial<{
display?: {
title?: string | undefined;
description?: string | undefined;
icon?: import("react").ReactNode;
} | undefined;
shortcuts?: string[] | undefined;
HTMLAttributes?: import("react").HTMLAttributes<HTMLElement> | undefined;
} & TOptions>;
type UseBlockSelectedProps = {
blockId: string;
at?: YooptaPathIndex;
} | {
at: YooptaPathIndex;
blockId?: string;
};
declare const useBlockSelected: ({ blockId, at }: UseBlockSelectedProps) => boolean;
export { useYooptaEditor, useBlockData, useYooptaPluginOptions, useBlockSelected, useYooptaReadOnly, useYooptaFocused, YooptaContextProvider, };
//# sourceMappingURL=YooptaContext.d.ts.map