-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
How to: completely remove editor from DOM and JS #2085
Comments
It sounds like you're doing it wrong. . . Try frames if it's too hard. You can create and destroy iframes and it will effectively do what you're asking. |
@matthewkastor
What is happening there, this is the correct behavior? |
@matthewkastor i think using iframe for every editor will create lots of unnecessary overhead. @belyanskii It doesn't remove dom nodes and event listeners so you need to additionally do something like |
XD well yeah, @nightwing XD every time the frame is recreated ace would have to load in it. Your idea works too, deleting and replacing dom nodes, then creating a new session, it just doesn't have the encapsulation that laying it all in a iframe does. Personally, I'd use your method because it will be faster. |
@matthewkastor thanks for idea with iframes! |
What I did was,
|
Hi guys!
I search for some good practices to completely remove editor from page. I need to create many instances of editor and delete them, but delete only DOM node is wrong, because i still have event-listeners and JS instances of editors. I try to use destroy method
ace.editor('id').destroy()
, but they leave DOM node and i don't understand what they do, because my editor still works.The text was updated successfully, but these errors were encountered: