diff options
Diffstat (limited to 'sites/all/modules/wysiwyg/wysiwyg.init.js')
-rw-r--r-- | sites/all/modules/wysiwyg/wysiwyg.init.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sites/all/modules/wysiwyg/wysiwyg.init.js b/sites/all/modules/wysiwyg/wysiwyg.init.js new file mode 100644 index 000000000..6ccdb3146 --- /dev/null +++ b/sites/all/modules/wysiwyg/wysiwyg.init.js @@ -0,0 +1,19 @@ + +Drupal.wysiwyg = Drupal.wysiwyg || { 'instances': {} }; + +Drupal.wysiwyg.editor = Drupal.wysiwyg.editor || { 'init': {}, 'attach': {}, 'detach': {}, 'instance': {} }; + +Drupal.wysiwyg.plugins = Drupal.wysiwyg.plugins || {}; + +(function ($) { + // Determine support for queryCommandEnabled(). + // An exception should be thrown for non-existing commands. + // Safari and Chrome (WebKit based) return -1 instead. + try { + document.queryCommandEnabled('__wysiwygTestCommand'); + $.support.queryCommandEnabled = false; + } + catch (error) { + $.support.queryCommandEnabled = true; + } +})(jQuery); |