GetmeUK / ContentTools

A JS library for building WYSIWYG editors for HTML content.
http://getcontenttools.com
MIT License
3.95k stars 395 forks source link

onEdit event #349

Closed avramovic closed 7 years ago

avramovic commented 7 years ago

Is there an event or anything similar which would allow me to act when user starts editing content. To be precise, I'm trying to replace content being edited when user clicks on edit button (doing some cleanup in the code). Tried to hook to click event of the edit button (.ct-ignition__button--edit) but it's not really working (content is replaced but the editor is not working).

Same goes with the "onCancelEdit" event. I'd need to revert original content if user cancels editing.

avramovic commented 7 years ago

Nevermind, found it :) http://getcontenttools.com/api/content-tools#editor-app