10play / 10tap-editor

React Native Rich Text Editor
MIT License
608 stars 25 forks source link

[BUG]: Editor isn't ready yet #183

Closed jonhy751 closed 2 weeks ago

jonhy751 commented 3 weeks ago

Describe the bug

Even just declaring the editor, I received this message.

 const editor = useEditorBridge({
    bridgeExtensions: [
      ...TenTapStartKit,
      PlaceholderBridge.configureExtension({
        placeholder: "Escreva seu comentario",
      }),
    ],
    theme: {
      toolbar: {
        toolbarBody: { borderTopWidth: 0 },
        icon: {
          width: 26,
          height: 26,
        },
      },
      webview: {
        marginTop: -13,
        marginLeft: 8,
      },
    },
  });

To Reproduce Declare editor in component...

Expected behavior no receive warn in app

Screenshots image image

17Amir17 commented 3 weeks ago

We had a similar issue here: https://github.com/10play/10tap-editor/issues/175 Can we get the full code?

rustyonrampage commented 1 week ago

I had the same issue. If you using useEditorBridge, you need to make sure there is RichText being rendered in the view. When my RichText was in a conditional render, it was giving the warning. After that I created a separate component with both the brige hook and RichText. I rendered this component in coniditon and there's no warning.