Error: [SUNEDITOR.core.callPlugin.fail] The called plugin does not exist or is in an invalid format. (pluginName:"table")
See original GitHub issueDescribe the bug When i clicked table button on toolbar i got this error: Error: [SUNEDITOR.core.callPlugin.fail] The called plugin does not exist or is in an invalid format. (pluginName:“table”)
To Reproduce Steps to reproduce the behavior:
- Load editor
- Click on Table button
- See error
My codes Show a view to set numbers of column and rows
Screenshots
Desktop (please complete the following information):
- OS: MacOS
- Browser Firefox: 99.0b8
- “suneditor”: “^2.42.0”,
- “suneditor-react”: “^3.4.0”,
- “next”: “10.2.0”,
Additional context
import React from 'react';
import dynamic from 'next/dynamic';
const plugins = dynamic(() => import('suneditor/src/plugins'), {
ssr: false,
});
const SunEditor = dynamic(() => import('suneditor-react'), {
ssr: false,
});
export const options = {
plugins: [plugins],
height: 300,
buttonList: [
// Default
['undo', 'redo'],
['font', 'fontSize', 'formatBlock'],
['paragraphStyle', 'blockquote'],
['bold', 'underline', 'italic', 'strike', 'subscript', 'superscript'],
['fontColor', 'hiliteColor', 'textStyle'],
['removeFormat'],
['outdent', 'indent'],
['align', 'horizontalRule', 'list', 'lineHeight'],
['table', 'link', 'image', 'video', 'audio'],
['imageGallery'],
['fullScreen', 'showBlocks', 'codeView'],
['preview', 'print'],
['template'],
],
};
const RichTextEditor = function () {
return (
<SunEditor setOptions={options} setAllPlugins={false} />
);
};
export default RichTextEditor;
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
setting plugins · Issue #162 · JiHong88/SunEditor - GitHub
Uncaught Error : [SUNEDITOR.core.callPlugin.fail] The called plugin does not exist or is in an invalid format. (pluginName:"align")
Read more >Suneditor - npm.io
The Suneditor is a lightweight, flexible, customizable WYSIWYG text editor for your web applications. Pasting from Microsoft Word and Excel.
Read more >JSDoc - SunEditor
It can be accessed from object's "core" property returned after editor creation. ... If the plugin is not added, add the plugin and...
Read more >suneditor-react - npm
There are 18 other projects in the npm registry using suneditor-react. ... Note: suneditor-react doesn't expose the core object in the ...
Read more >suneditor/README.md - UNPKG
18, > - Can use CodeMirror, KaTeX. 19, > - And.. many other features :) 20. 21 ![WYSIWYG HTML Editor](http://suneditor.com/docs/screen-main-w.png?v=2700).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I used dynamic import inside useEffect and it worked
Thank @JiHong88 for your support 😃
Thank for the answer. I think i found out what’s happening. When my application is loaded i clicked table icon and error fired like above. Then i
const options = dynamic(() => import('suneditor/src/plugins'), { ssr: false, });
toconst options = require('suneditor/src/plugins')
plugins
doesn’t load correctly when using dynamic import. If i useconst options = require('suneditor/src/plugins')
for the first time the application loading, i’ll get error like belowHoping it can make you understand what’s happening