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.

Forum WYSIWYG Editor?

April 24, 2011 2:32am

Subscribe [4]
  • #1 / Apr 24, 2011 2:32am

    DigitalDesigns

    94 posts

    I see that this question was asked a LONG time ago, and no recent answer has been given.  We have implemented the scaffold template (love it) BUT, are looking for a wysiwyg editor to implement. 

    We currently have Wygwam installed…can we utilize this?

    Thanks!

  • #2 / Apr 25, 2011 4:59am

    John Henry Donovan

    12339 posts

    DigitalDesigns,

    I don’t believe an add-on exists to implement this for the forums.
    You are free to install your own wysiwyg editor. Wygwam itself uses CKEditor so I would start there and try and apply it to your textarea

  • #3 / Jun 06, 2011 12:09am

    Roger Glenn

    54 posts

    I was able to do this with CKEditor.

    I added these lines to the top of the “Post Submission Form” template inside the Discussion Forum module templates.

    <skriptz type="text/javascript" src="/js/jquery-1.6.1.min.js"></skriptz>
    <skriptz type="text/javascript" src="/js/ckeditor/ckeditor.js"></skriptz>
    <skriptz type="text/javascript" src="/js/ckeditor/adapters/jquery.js"></skriptz>
    <skriptz type="text/javascript" src="/js/ckeditor.init.js"></skriptz>

    I’m borrowing code from another project in which I used jQuery to initialize the CKEditor. I normally would have used their CDN link

    <a href="http://code.jquery.com/jquery-1.6.1.min.js">http://code.jquery.com/jquery-1.6.1.min.js</a>

    but this site is using SSL so I had to download the full library in order to prevent security warnings from popping up.

    My ckeditor.init.js file consists of this:

    jQuery(function(){
        // ckeditor config
        var wysiwyg_nl2br_config = {
            toolbar : 
                [
                    ['Bold','Italic','Underline','Strike','Subscript','Superscript','-','NumberedList','BulletedList','-','JustifyLeft','JustifyCenter','JustifyRight','-','PasteText','PasteFromWord','RemoveFormat','-','Link','Unlink','Anchor','Scayt','-','Source']
                ],
            width : '650px',
            height : '200px',
            forcePasteAsPlainText : 'true',
            enterMode : CKEDITOR.ENTER_BR
        };
        
        jQuery("textarea.textarea").ckeditor(function(){
            // attach CKFinder
        }, wysiwyg_nl2br_config);
    });

    Hopefully someone else will find this useful.

  • #4 / Jun 06, 2011 1:29am

    Sue Crocker

    26054 posts

    Thanks for the assist, Roger!

    DigitalDesigns, is the information from Roger enough to get you started?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases