Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugins Type Error #1160

Closed
jingeunee opened this issue Aug 24, 2020 · 0 comments
Closed

plugins Type Error #1160

jingeunee opened this issue Aug 24, 2020 · 0 comments

Comments

@jingeunee
Copy link

jingeunee commented Aug 24, 2020

Describe the bug

Plugin cannot be applied.

import TuiEditor from '@toast-ui/editor';
import ColorSyntax from '@toast-ui/editor-plugin-color-syntax';
import CodeSyntaxHighlight from '@toast-ui/editor-plugin-code-syntax-highlight';
import TableMergedCell from '@toast-ui/editor-plugin-table-merged-cell';

const instance = new TuiEditor({
   ...
  plugins: [
          CodeSyntaxHighlight,
          ColorSyntax, 
          // TableMergedCell,  // type error
  ],
});

To Reproduce

declare const tableMergedCell: PluginInfo;

interface PluginInfo {
  pluginFn: Plugin;
  renderer: HTMLConvertorMap;
  parser: CustomParserMap;
}

type Plugin = (editor: any, options?: any) => void;

not matching..

type Plugin = (editor: Editor | Viewer, options: any) => void;

Expected behavior

Type error

Screenshots

image

Desktop (please complete the following information):

  • OS: [Window]
  • Browser [chrome]
  • Version [chrome: 버전 84.0.4147.125]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants