From b0da043e34b4131e81b43850954e4930d2df9e50 Mon Sep 17 00:00:00 2001 From: Nikhil Benesch Date: Fri, 3 Aug 2012 15:47:24 -0400 Subject: [PATCH] Expose internal IceChangeEditor instance in TinyMCE Added a command to TinyMCE (via existing ice plugin) to expose the internal IceChangeEditor to allow plugins and external code access to the ice API. --- .../jscripts/tiny_mce/plugins/ice/editor_plugin.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/tinymce/jscripts/tiny_mce/plugins/ice/editor_plugin.js b/lib/tinymce/jscripts/tiny_mce/plugins/ice/editor_plugin.js index f44f9ead..c1276bc5 100644 --- a/lib/tinymce/jscripts/tiny_mce/plugins/ice/editor_plugin.js +++ b/lib/tinymce/jscripts/tiny_mce/plugins/ice/editor_plugin.js @@ -120,6 +120,14 @@ }, 500); }); + /** + * Returns reference to internal ice instance for external manipulation. + * @return internal IceChangeEditor instance + */ + ed.addCommand('ice_getinstance', function() { + return changeEditor; + }); + /** * Re-initializes ice's environment - resets the environment variables for the current page * and re-initializes the internal ice range. This is useful after tinymce hides/switches