Liu-Young / pagedown

Automatically exported from code.google.com/p/pagedown
Other
0 stars 0 forks source link

unbinding the editor #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 latch...@gmail.com on 20 Dec 2011 at 12:33

GoogleCodeExporter commented 9 years ago
I'm having this issue too---is there any workaround for it?

Original comment by m...@bridgecanada.com on 19 Jul 2012 at 3:20

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
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 latch...@gmail.com on 19 Jul 2012 at 6:52

GoogleCodeExporter commented 9 years ago
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 m...@bridgecanada.com on 19 Jul 2012 at 4:02