Show On More Pages

This discussion is related to the CreativeCLEditor addon.
agcyphersagcyphers Nooooop.
edited January 2015 in Feedback

I noticed that, with this plugin, I wasn't seeing the WYSIWYG editor on all pages (profile, private messages, etc). I modified the class.creativecleditor.plugin.php as follows:

class CreativeCLEditorPlugin extends Gdn_Plugin {

    public function Setup(){
        SaveToConfig('Garden.Html.SafeStyles', FALSE);
    }

    public function OnDisable(){
        RemoveFromConfig('Garden.Html.SafeStyles');
    }

    public function Base_Render_Before($Sender) {
        $this->_AddCreativeCLEditor($Sender);
    }

    private function _AddCreativeCLEditor($Sender) {
        $Options = array('ie' => 'gt IE 6', 'notie' => TRUE);

        $Sender->AddCssFile('jquery.cleditor.css', 'plugins/CreativeCLEditor', $Options);
        $Sender->AddJsFile('jquery.cleditor.js', 'plugins/CreativeCLEditor', $Options);

            $Sender->AddJsFile('cleditor_init.js', 'plugins/CreativeCLEditor', $Options);
            $Sender->AddJsFile('cleditor_plugins.js', 'plugins/CreativeCLEditor', $Options);

            $CssInfo = AssetModel::CssPath('cleditor.css', 'plugins/CreativeCLEditor');
            $CssPath = $CssInfo ? Asset($CssInfo[1]) : '';

            $Sender->Head->AddString('<script type="text/javascript">var cleditor_doc_css_file = \''.$CssPath.'\';</script>');
        }
}
Tagged:
Sign In or Register to comment.