Jungwoo-An / react-editor-js

⚛️📝The unofficial editor-js component for React
https://codesandbox.io/s/react-editor-js-v2-34bfl
MIT License
940 stars 77 forks source link

React Editor JS in his second version does not render i18n correctly #212

Open SalahAdDin opened 1 year ago

SalahAdDin commented 1 year ago

Environment

Describe

Passing i18n object for internationalization through the react-editor-js latest version:

Following the documentation, we pass both the direction and messages properties to i18n:

<EditorJS
          // data={JSON.parse(value)}
          // enableReInitialize={true}
          onReady={handleReady}
          onChange={handleChange}
          tools={{ ...requiredTools, ...customTools, ...customImageTool }}
          instanceRef={(instance) => setEditorInstance(instance)}
          i18n={getI18N(currentLanguage)}
        />

As you can see in the picture, the property is coming to the editor component, but it is rendering all messages in English yet.

Additionally, we have another bug: Screen Shot 2022-10-14 at 00 10 27

We tested the same setup with react-editor-js version: 1.10.0 and it works fine.

Could it be possible the package is omitting this API too?

Thank you.

SalahAdDin commented 1 year ago

@Jungwoo-An any thoughts on this problem?