News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How to add DragDrop Plugin to SCEditor

Started by Dhayzon, April 15, 2020, 10:19:56 PM

Previous topic - Next topic

Dhayzon

     add_integration_function('integrate_sceditor_options',Mod\Hook::sceditor',false);


Hook  function  success
public static function sceditor(&$sce_options){
       
        global $context;
      $sce_options['plugins'] .=   'dragdrop',

        return  $sce_options;
    }




how to add this options ?


dragdrop: {
        allowedTypes: ...,
        handleFile: function (file, createPlaceholder) {
            ...
        }
    }




My problem, This code isn't on global scope
var textarea = $("#', $editor_id, '").get(0);
sceditor.create(textarea, ', $smcFunc['json_encode']($editor_context['sce_options'], JSON_PRETTY_PRINT), ');';


Advertisement: