JiHong88 / suneditor

Pure javascript based WYSIWYG html editor, with no dependencies.
http://suneditor.com
MIT License
1.67k stars 308 forks source link

Uncaught TypeError: Cannot read properties of undefined (reading 'settings') in popup for adding image #1357

Open fahvaz opened 6 months ago

fahvaz commented 6 months ago

To make it easier for us to help you, please include as much useful information as possible.

Version

Write the version of the Editor you are currently using. latest using

<script src="https://cdn.jsdelivr.net/npm/suneditor@latest/dist/suneditor.min.js"></script>

Additional context

Add any other context about the problem here. Once I want to use the pop-up for inserting image, I have this error(Uncaught TypeError: Cannot read properties of undefined (reading 'settings') in popup for adding image) My project is MVC using jquery-2.2.0

this is the code

sunEditor = SUNEDITOR.create((document.getElementById('soweditor')), {
buttonList: [ ['undo', 'redo'], ['font', 'fontSize', 'formatBlock'], ['bold', 'underline', 'italic', 'strike'], ['removeFormat'], ['fontColor', 'hiliteColor'], ['indent', 'outdent'], ['align', 'horizontalRule', 'list', 'table'], ['image'] ], callBackSave: function (contents, isChanged) { console.log(contents); }
});