core.js: An exception occurred while resetting the "Range" object.
See original GitHub issueHi @JiHong88 ,
I’m using the following function to clear the editor body text. The function use’s commandHandler
to selectAll content and remove the node. But after calling this function I’m getting a warning emitted from core.js
lib about resetting RANGE object.
Is it possible to expose a public property on SunEditor to clear the body text? Or would you suggest a different approach to my function below?
@Input() set clearText(clearText: boolean) {
if (clearText && this.editorInstance) {
this.editorInstance.core.commandHandler(null, 'selectAll');
this.editorInstance.core.removeNode();
}
}
Console Error: core.js?4e0d:1630 [SUNEDITOR.core.removeNode.exception] An exception occurred while resetting the “Range” object.
Complete Stack Trace:
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
The specified value cannot be parsed, or is out of range when ...
When the value is transformed in the number pipe, it is first parse to Number . If it is not parse-able, then you...
Read more >Errors | Node.js v19.3.0 Documentation
When an asynchronous method is called on an object that is an EventEmitter , errors can be routed to that object's 'error' event....
Read more >Built-in Exceptions — Python 3.11.1 documentation
This exception is raised when a system function returns a system-related error, including I/O failures such as “file not found” or “disk full”...
Read more >Microsoft Graph error responses and resource types
Learn about errors that can be returned in Microsoft Graph responses. Errors are returned using standard HTTP status codes and a JSON error...
Read more >JavaScript RangeError: Maximum Call Stack Size Exceeded
The JavaScript RangeError: Maximum call stack size exceeded is an error that occurs when there are too many function calls, or if a...
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
Thanks for reporting.
Resets the “Range” object when deleting, inserting, or modifying a node. This warning is displayed when the cannot be set appropriate text node to the “container” when run
removeNode
method. But in most cases, the code runs fine.I put a warning because it occurs in certain situations. Can you show the HTML of the editor when outputting the warning?
Hi @JiHong88, thank you. That seems to have resolved our issue.