ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

WYSIWYG Progress Light

August 05, 2007 8:08am

Subscribe [14]
  • #1 / Aug 05, 2007 8:08am

    JohnD

    114 posts

    For those of us who have customers who freak out when confronted with html formatting of postings, and who have therefore, in the name of customer service struggled with the likes of tinyMCE and FCKEditor, there is a small amount of relief.

    Probably the most frustrating part of the tinyMCE exercise is making sense of the plug-ins, especially image/file uploads and linking. iBrowser and FileManager work, but only up to a point, and then not always on all browsers. Safari is especially problematic.

    I have just finished implementing an AJAX file manager which also integrates with FCKEditor and tinyMCE - it’s called (strangely enough) “Ajax File Manager.” The integration instructions could be a lot clearer, but I managed by reverse engineering the demo to suit my needs. And what a relief it is after iBrowser an co.

    So, if you are interested, visit phpletter.com and see for yourself.

    For one vital bit of help, join their forum and look at this entry.

    When integrated with tinyMCE, the plug-in actually adds itself to the native tinyMCE plug-ins for links and images, leaving the tinyMCE functionality intact but adding the Ajax File Manager functionality to it by means of a small launching button - very nice, but you need to know this.

    I have appended my versions of the tinyMCE settings and the Ajax FileManager base-config file, in case they help.

  • #2 / Aug 05, 2007 10:38am

    e-man

    1816 posts

    Looks very nice, thanks for posting that here. Will definitely try that with the next client who freaks out when I tell him there’s this little thing called Markdown 😊
    Cheers!

  • #3 / Aug 07, 2007 3:44pm

    mx3design

    15 posts

    Very good John, works well.. thank you very much!

  • #4 / Aug 28, 2007 3:42am

    asozzi

    262 posts

    I did this some 3 month ago and documented the setup, including a slight change to the TinyMCE plugin so as the AJAX file manager js calls can be entered inside the EE CP and the TinyMCE can be toggled at will to show the HTML.


    So to save newcomers a few minutes (dare I say hours in my case ;-( ) :
    Google Document

    The current customers love it, wish I had the time (or skills) to write the EEplugin to replace the current “upload File” to use this…...

  • #5 / Aug 28, 2007 10:19am

    e-man

    1816 posts

    I continue to be amazed by the generosity of this community, thanks for adding that. You might want to consider adding it to the Wiki.
    Cheers!

  • #6 / Aug 29, 2007 3:45am

    OrganizedFellow

    435 posts

    ... So, if you are interested, visit phpletter.com and see for yourself.

    For one vital bit of help, join their forum and look at this entry ...

    i truly hope not to offend you JohnD.
    Can you show a screenshot of your WYSIWG Progress Light, so we wouldn’t have to sign up for yet, another forum?

  • #7 / Aug 29, 2007 9:07am

    JohnD

    114 posts

    Not offended, just puzzled. Of what would you like a screenshot? I cannot quite understand how a screenshot would help with what you need to know, but I will do my best if you could clarify.

  • #8 / Aug 29, 2007 11:52am

    OrganizedFellow

    435 posts

    Am so sorry JohnD.
    I did not fully read your post.
    I thought you had released a WYSIWYG plugin/extension for the user interface. oops.

  • #9 / Aug 29, 2007 12:12pm

    JohnD

    114 posts

    No problem - let me know if I can help in any other way.

  • #10 / Oct 09, 2007 11:47am

    spcejunk

    27 posts

    John,

    Are you able to use multiple upload directories with the AJAX file manager?

  • #11 / Oct 09, 2007 12:34pm

    JohnD

    114 posts

    Are you able to use multiple upload directories with the AJAX file manager?

    Yes, you can use multiple directories, permissions permitting, and you can create directories (folders) as required.

  • #12 / Oct 09, 2007 2:39pm

    spcejunk

    27 posts

    That’s excellent. I look forward to trying it out. Uploads were always our big struggle with using the WYSIWYG options.

  • #13 / Nov 15, 2007 6:29am

    Sanity11

    314 posts

    I am trying to get this to work for several hours now without succes.
    I have read the document provided by asozzi, copied the code, read the instructions on phpletter but without any succes. I just dont see the icon where i can upload the images…. And if I copy the code provided by asozzy the tinyMCE doest load anymore…. does anybody know how to do this right?

  • #14 / Nov 15, 2007 6:51am

    JohnD

    114 posts

    Sanity 11 -

    1. If you post copies of your tinyMCE settings and Ajax FileManager base-config file I will try to help.
    2. Also, are you invoking tinyMce from within a template or within the EE CP?
    3. Then it will also help to know which browser/terminal you are using.

  • #15 / Nov 15, 2007 8:07am

    Sanity11

    314 posts

    Hello!
    Thank you for the fast reaction.
    De browsers I am using are FF2 IE7 and IE6
    I want to use it in the EE publish area.

    Thanks for the help! I think this is a solution for the what i think is the biggest downside of EE! Fantastic work!

    The hyrachy is as follows.

    system
    _extensions
    __ext.tiny_mce.php
    ajaxfilemanager
    _tiny_mce
    __plugins
    ___ajaxfilemanager
    ____inc
    _____config.base.php
    _uploaded
    _tinymce_test.php

    I will add the ext.tiny_mce in this post because te Attach files to this post link is not responding….

    <?php
    
    if ( ! defined('EXT'))
    {
        exit('Invalid file request');
    }
    
    
    class Tiny_mce
    {
        var $settings        = array();
        
        var $name            = 'Tiny MCE Extension for EE';
        var $version        = '1.0.1';
        var $description    = 'Converts Textareas in Publish area into WYSIWYG editors';
        var $settings_exist    = 'y';
        var $docs_url        = 'http://tinymce.moxiecode.com/documentation.php';
        
        // -------------------------------
        //   Constructor - Extensions use this for settings
        // -------------------------------
        
        function Tiny_mce($settings='')
        {
            $this->settings = $settings;
        }
        // END
        
        // -------------------------------
        //  Add JavaScript Header
        // -------------------------------
        
        function add_header()
        {
            global $PREFS, $EXT;
            
            $r = ($EXT->last_call !== FALSE) ? $EXT->last_call : '';
    
            $settings_parts = implode("\n\t\t", preg_split("/(\r\n|\n|\r)/", trim($this->settings['configuration'])));
            
            $r .= '
    
    settings['script_url']).'">
    
    //<![CDATA[
    tinyMCE.init(
        {
    '.
    $settings_parts.
    '
        }
    );
    //]]>
    
    
    ';    
            return $r;
        }
        // END
        
        
        // --------------------------------
        //  Activate Extension
        // --------------------------------
        
        function activate_extension()
        {
            global $DB, $PREFS;
            
            $default_settings = serialize(array('script_url'     => $PREFS->ini('site_url', TRUE).'tinymce/jscripts/tiny_mce/tiny_mce.js',
                                                'configuration' => 'mode : "textareas"'));
            
            $DB->query($DB->insert_string('exp_extensions',
                                          array('extension_id'    => '',
                                                'class'            => "Tiny_mce",
                                                'method'        => "add_header",
                                                'hook'            => "publish_form_headers",
                                                'settings'        => $default_settings,
                                                'priority'        => 10,
                                                'version'        => $this->version,
                                                'enabled'        => "y"
                                                )
                                         )
                       );
    
        }
        // END
        
        
        // --------------------------------
        //  Update Extension
        // --------------------------------  
        
        function update_extension($current='')
        {
            global $DB;
            
            if ($current == '' OR $current == $this->version)
            {
                return FALSE;
            }
            
            if ($current > '1.0.0')
            {
                // Update queries for next version 1.0.1
            }
            
            $DB->query("UPDATE exp_extensions 
                        SET version = '".$DB->escape_str($this->version)."' 
                        WHERE class = 'Publish_form'");
        }
        // END
        
        
        // --------------------------------
        //  Settings
        // --------------------------------  
        
        function settings()
        {
            global $PREFS;
            
            $settings = array();
            
            $settings['script_url']        = $PREFS->ini('site_url', TRUE).'tinymce/jscripts/tiny_mce/tiny_mce.js';
            $settings['configuration']    = array('t', "");
            
            // Complex:
            // [variable_name] => array(type, values, default)
            // variable_name => short name for setting and used as the key for language file
            // type:  t - textarea, r - radio buttons, s - select, ms - multiselect, f - function calls
            // values:  can be array (r, s, ms), string (t), function name (f)
            // default:  name of array member, string, nothing
            //
            // Simple:
            // [variable_name] => 'Butter'
            // Text input, with 'Butter' as the default.
            
            return $settings;
        }
        // END
    
    
    }
    // END Class
    
    ?>
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases