pagedown icon indicating copy to clipboard operation
pagedown copied to clipboard

unbinding the editor

Open GoogleCodeExporter opened this issue 10 years ago • 4 comments

I use the editor within a 'modal' dialog within the page (using colorbox). When 
someone closes the dialog, I'd like to be able to cleanup after the editor has 
been shown so that if they re-open the dialog, everything is fresh again. 

This means unbinding any events and removing elements like the wmd-button-bar. 
Would it be possible to add a editor.close() function?

Original issue reported on code.google.com by [email protected] on 20 Dec 2011 at 12:33

GoogleCodeExporter avatar Sep 12 '15 05:09 GoogleCodeExporter

I'm having this issue too---is there any workaround for it?

Original comment by [email protected] on 19 Jul 2012 at 3:20

GoogleCodeExporter avatar Sep 12 '15 05:09 GoogleCodeExporter

[deleted comment]

GoogleCodeExporter avatar Sep 12 '15 05:09 GoogleCodeExporter

The workaround is to destroy the dom objects. Fugly. 

That said, I suggest you drop markdown entirely and switch to this (that is 
what I'm in the process of doing right now): 
https://github.com/jhollingworth/bootstrap-wysihtml5/

The ux is much better (but there also isn't a destroy method)... heh....

Original comment by [email protected] on 19 Jul 2012 at 6:52

GoogleCodeExporter avatar Sep 12 '15 05:09 GoogleCodeExporter

Thanks!  I realized the pagedown JS code is looking pretty old by today's 
standards and moved on to epiceditor for the time being.

I'll have a closer look at that bootstrap editor---I think I could use that in 
a few places.

Cheers!

-Mike

Original comment by [email protected] on 19 Jul 2012 at 4:02

GoogleCodeExporter avatar Sep 12 '15 05:09 GoogleCodeExporter