tinymce.inc 808 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * elFinder Integration
  4. *
  5. * Copyright (c) 2010-2018, Alexey Sukhotin. All rights reserved.
  6. */
  7. /**
  8. * @file
  9. * TinyMCE integration plugin
  10. */
  11. /**
  12. * Pseudo-hook for elfinder hook_wysiwyg_plugin implementation
  13. */
  14. function elfinder_tinymce_elfinder_editor_plugin($options) {
  15. drupal_add_js($options['plugin_url_base'] . '/tinymce.js');
  16. return array(
  17. 'elfinder' => array(
  18. 'extensions' => array('elfinder' => t('elFinder')),
  19. 'url' => $options['homepage_url'],
  20. 'options' => array(
  21. 'file_browser_callback' => 'elfinder_tinymce_browse_callback',
  22. 'file_browser_url' => $options['elfinder_url'], // non standard TinyMCE configuration variable to pass source application to elFinder
  23. 'inline_styles' => TRUE,
  24. ),
  25. 'load' => FALSE,
  26. ),
  27. );
  28. }