HarryChen0506 / react-markdown-editor-lite

a light-weight Markdown editor based on React. 一款轻量的基于React的markdown编辑器
https://harrychen0506.github.io/react-markdown-editor-lite/
MIT License
1.02k stars 161 forks source link

[BUG] Locale of en-us only takes effect partly on several tool bars when using next.js #257

Open jc-yang opened 2 years ago

jc-yang commented 2 years ago

I am using next.js in my code, here is what I wrote:

import dynamic from 'next/dynamic';

const MdEditor: any = dynamic(
  () => {
    return new Promise((resolve) => {
      import('react-markdown-editor-lite').then((res) => {
        const editor = res.default;
        const plugins = res.Plugins;
        editor.useLocale('enUS');
        editor.use(plugins.TabInsert, { tabMapValue: 1 });
        resolve(editor as any);
      });
    });
  },
  {
    ssr: false,
  },
);

Some of tips do display in English when hovering, while the 表格, 制表符, 撤销 and 重做 are still in Chinese. Did I make mistakes in the codes? Or it is a bug to be fixed.

https://user-images.githubusercontent.com/33781521/160543337-2401ab17-5bec-48fd-a8c5-93f18ae956ee.mov