[英]Error: Editor' is not exported from 'slate-react'
我正在嘗試在 React 中構建簡單的 slate 編輯器。 我正在使用 create-react-app 並且我制作了簡單的組件來表示編輯器 這是我的 package json 文件 我有錯誤無法編譯。 ./src/components/SlateEditor.js 嘗試導入錯誤:“編輯器”未從 ...
[英]Error: Editor' is not exported from 'slate-react'
我正在嘗試在 React 中構建簡單的 slate 編輯器。 我正在使用 create-react-app 並且我制作了簡單的組件來表示編輯器 這是我的 package json 文件 我有錯誤無法編譯。 ./src/components/SlateEditor.js 嘗試導入錯誤:“編輯器”未從 ...
[英]Problem to add a new block right after the current one
我正在嘗試在 cursor 所在的塊之后添加一個新塊/我單擊一個按鈕的位置。 我的問題是: 如何確定當前塊的路徑? 之后我可以使用哪種方法添加塊? 我使用insertNode但在調用它時不能指定路徑...因此該塊被添加到塊列表的最后。 我看到insertNode方法有一個可選參數,但它沒有記錄並且似 ...
[英]get copied content inside onCopy hook (plugin)
我試圖將復制的片段徒勞地放入onCopy掛鈎中。 我一直在嘗試使用event.clipboardData...const { clipboardData } = event; const encoded = clipboardData.getData("application/x-slate-fra ...
[英]Moving cursor in react slate-editor
我正在嘗試在 react slate-editor 中移動 cursor。 我嘗試以兩種方式做到這一點。 第一的: 第二: 不幸的是, select和moveTo似乎不會影響 cursor position。 有人可以幫忙嗎? ...
[英]TypeError: Text.isText is not a function
我正在關注關於https://docs.slatejs.org/walkthroughs/04-applying-custom-formatting的石板教程有一個 function 調用 Text.isText(n),我不斷收到 Type:Error Text.isText is not a f ...
[英]Slate editor active state always false using isBlockActive from examples
我通過組合幾個 slates 示例創建了一個編輯器,即https://www.slatejs.org/examples/richtext和https://www.slatejs.org/examples/links 但是,當我為所有塊級節點添加這些活動 state 時,它根本不起作用,這意味着我無法 ...