Uncaught TypeError: Cannot read property 'classList' of null
See original GitHub issueDescribe the bug
A clear and concise description of what the bug is.
Uncaught TypeError: Cannot read property 'classList' of null
To Reproduce Steps to reproduce the behavior:
I use only Native HTML, CSS, JAVASCRIPT
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/codemirror.min.css" />
<link rel="stylesheet" href="https://uicdn.toast.com/editor/latest/toastui-editor.min.css" />
</head>
<body>
<!-- ERROR -->
<!--
<form>
<div id="editor"></div>
</form>
-->
<div id="editor"></div>
<script src="https://code.jquery.com/jquery-latest.min.js"></script>
<script src="https://uicdn.toast.com/editor/latest/toastui-jquery-editor.min.js"></script>
<!-- <script src="https://uicdn.toast.com/editor/latest/i18n/ko-kr.js"></script> -->
<script>
const option = {
initialEditType: 'wysiwyg',
height: '500px'
};
const editor = $('#editor').toastuiEditor(option);
</script>
</body>
</html>
Expected behavior A clear and concise description of what you expected to happen.
“I cannot use editor with wrapping by
<form>tag”
Screenshots If applicable, add screenshots to help explain your problem.
Console
Uncaught TypeError: Cannot read property 'classList' of null
at e.exports (toastui-jquery-editor.min.js:14)
at r.i._updateClassByButton (toastui-jquery-editor.min.js:30)
at r.i._activateTabByButton (toastui-jquery-editor.min.js:30)
at r.i.activate (toastui-jquery-editor.min.js:30)
at r.i._render (toastui-jquery-editor.min.js:30)
at new r (toastui-jquery-editor.min.js:30)
at r.i._initDOM (toastui-jquery-editor.min.js:30)
at r [as constructor] (toastui-jquery-editor.min.js:30)
at new r (toastui-jquery-editor.min.js:30)
at e.t._initPopupAddImage (toastui-jquery-editor.min.js:30)
Device Information -> SKIP
Additional context Add any other context about the problem here.
I want to use
i18nwith JQuery. But I got error When I add script line in document,ko-kr.js
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (7 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'classList' of null
It means that document.getElementById("lastName") is returning undefined and you're trying to call classList on undefined itself.
Read more >TypeError: Cannot read property 'classList' of Null in JS
The "Cannot read property 'classList' of null" error occurs when trying to access the classList property on a null value. To solve the...
Read more >[Input Masks Library] Cannot read property 'classList' of null
Hi there,. I am using the credit card mask but i keep receveing the error Cannot read property 'classList' of null every time...
Read more >Cannot read property 'classList' of null - responsive menu
My understanding is that the script is trying to remove navTop.classList.remove(“responsive”); however fails to do so. The CSS can be found here http:// ......
Read more >menu – Cannot read property 'classList' of null - WordPress.org
I am trying to convert this site http://buildandtest.atspace.cc/ into twentysixteen child theme. It appears that /js/menu.js in my child theme is not ...
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 Free
Top 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

@YBAZAN @gowda-nirmal @mieszko4 The npm release will be done later this month.
I think submit markdown data with form is a common usecase.