bootstrap-wysiwyg icon indicating copy to clipboard operation
bootstrap-wysiwyg copied to clipboard

Destroy method

Open andrelcm opened this issue 9 years ago • 3 comments

Is there a way to destroy the editor and turn back to the original div, but with the edited content in it?

andrelcm avatar Aug 10 '15 03:08 andrelcm

I'm not sure I follow what you're asking. What would be the purpose of destroying it if you want to keep the content?

codewithtyler avatar Aug 10 '15 03:08 codewithtyler

Look at this: http://summernote.org/#/example#click2edit When you destroy the editor, you go back to the original div, without the toolbar or any bounds (to save memory), but you save the content that may have changed.

andrelcm avatar Aug 10 '15 03:08 andrelcm

Ah I see. Essentially the toolbar itself is hidden and only appears when you hit a button. The destroy function would be tied to the save button as it hides the toolbar again. In the past people have developed their own version of this to work with the editor as it can be implemented in multiple ways.

@steveathon what do you think? I do think it would be a good idea if we could implement the destroy method ourselves. It would make implementing an admin page easier for anyone who uses our editor.

codewithtyler avatar Aug 10 '15 04:08 codewithtyler