I am trying to add image cropping functionality into TinyMCE editors used for inline elements (editor appears after focus some inline element and is hidden after focus out, there are more edited areas on page).
Problem is I am not sure if it is good approach, my plan is to add some custom buttons in toolbar and handle them to init jCrop plugin for image used in editor and for confirm selected area to crop.
It seems jCrop basicly works fine in editor, but some problems occurred eg. when user initiate jCrop and then leave that editor and open another editor, it causes jCrop hang on image but withou toolbar.
For fix that I am looking for some callbacks functions of tinyMCE esspec. for event after focus some editable area and blur that one to ensure I can destroy jCrop if necessary, but I cant find that functions.
Is there any way how to set callback function like below?
tinymce.init({
selector: "div.edit",
inline: true,
setup: function (editor) {},
...
// some methods like this
onBlur: function (editor) {},
onFocus: function (editor) {}
});
Appreciate any help or advice, thx, Jan.