Dotclear


Ignore:
Timestamp:
03/05/14 21:04:23 (11 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Message:

Addresses #1896 : add choice of editor in preferences
Keeps old functions in core addFormater(), callFormater() for compatibility.

Location:
plugins/dcLegacyEditor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcLegacyEditor/_admin.php

    r2614 r2679  
    2323 
    2424if ($self_ns->active) { 
    25     $core->addBehavior('adminPostEditor',array('dcLegacyEditorBehaviors','adminPostEditor')); 
    26     $core->addBehavior('adminPopupMedia',array('dcLegacyEditorBehaviors','adminPopupMedia')); 
    27     $core->addBehavior('adminPopupLink',array('dcLegacyEditorBehaviors','adminPopupLink')); 
    28     $core->addBehavior('adminPopupPosts',array('dcLegacyEditorBehaviors','adminPopupPosts')); 
     25     $wiki2xhtml = new wiki2xhtml(); 
     26 
     27     $core->addEditorFormater('dcLegacyEditor','xhtml',create_function('$s','return $s;')); 
     28     $core->addEditorFormater('dcLegacyEditor','wiki',array($wiki2xhtml,'transform')); 
     29 
     30     $core->addBehavior('adminPostEditor',array('dcLegacyEditorBehaviors','adminPostEditor')); 
     31     $core->addBehavior('adminPopupMedia',array('dcLegacyEditorBehaviors','adminPopupMedia')); 
     32     $core->addBehavior('adminPopupLink',array('dcLegacyEditorBehaviors','adminPopupLink')); 
     33     $core->addBehavior('adminPopupPosts',array('dcLegacyEditorBehaviors','adminPopupPosts')); 
    2934} 
  • plugins/dcLegacyEditor/inc/dc.legacy.editor.behaviors.php

    r2614 r2679  
    1515     protected static $p_url = 'index.php?pf=dcLegacyEditor'; 
    1616 
    17      public static function adminPostEditor() { 
     17     public static function adminPostEditor($editor) { 
     18          if ($editor!='dcLegacyEditor') {return;} 
     19 
    1820          return 
    1921               self::jsToolBar(). 
Note: See TracChangeset for help on using the changeset viewer.

Sites map