Type the crypto, settings, and component any sites. [skip build]
This commit is contained in:
@@ -8,8 +8,10 @@ import React, {
|
||||
} from 'react';
|
||||
import { Box, Scroll, Text } from 'folds';
|
||||
import {
|
||||
DecoratedRange,
|
||||
Descendant,
|
||||
Editor,
|
||||
NodeEntry,
|
||||
createEditor,
|
||||
Element as SlateElement,
|
||||
Text as SlateText,
|
||||
@@ -122,8 +124,8 @@ export const CustomEditor = forwardRef<HTMLDivElement, CustomEditorProps>(
|
||||
const renderLeaf = useCallback((props: RenderLeafProps) => <RenderLeaf {...props} />, []);
|
||||
|
||||
const decorate = useCallback(
|
||||
([node, path]: [any, number[]]) => {
|
||||
const ranges: any[] = [];
|
||||
([node, path]: NodeEntry) => {
|
||||
const ranges: (DecoratedRange & { pendingCommand?: boolean })[] = [];
|
||||
|
||||
// Only decorate text nodes in the first paragraph
|
||||
if (path.length === 2 && path[0] === 0 && path[1] === 0 && SlateText.isText(node)) {
|
||||
|
||||
Reference in New Issue
Block a user