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.

LG Tiny MCE field in SAEF

August 09, 2010 4:50pm

Subscribe [2]
  • #1 / Aug 09, 2010 4:50pm

    rchampagne

    212 posts

    Does anyone know how to display Leevi’s Tiny MCE field in a SAEF? I have been trying to use the Wygwam extension from Brandon Kelly, but the field display’s twice when the page loads. And brandon doesn’t have any idea why that is happening, SO, i figured i might give the Tiny MCE extension a try, but not sure how to implement it in a SAEF.

    Any ideas?

    Many thanks,

    -Ryan

  • #2 / Aug 12, 2010 12:54pm

    rchampagne

    212 posts

    No one has any ideas here? Has anyone used any other kind of WYSIWYG text box in an SAEF? Any ideas would greatly help.

  • #3 / Aug 13, 2010 5:54pm

    earthisland

    46 posts

    Hi,
    I use it in a saef. I’m not sure it’s the up-to-date version, but it works okay. The code I use to deliver it in the template is

    ~script type="text/javascript" src="/scripts/tiny_mce.js"~ ~/script~
            ~script type="text/javascript"~
            tinyMCE.init({
                theme : "advanced",
                mode : "textareas",    
                theme_advanced_buttons1 : "formatselect,|,bold,italic,blockquote,|,sub,sup,charmap,|,image",
                theme_advanced_buttons2 : "bullist,numlist,outdent,indent,|,justifyleft,justifycenter,justifyright,link,unlink,|,code",
                theme_advanced_buttons3 : ""
            });
            ~/script~

    I changed the angle brackets to tildes so the forum would show them…
    Most of that’s just the buttons listed for the script. Hope that’s helpful,
    Matthew

  • #4 / Sep 02, 2010 3:46pm

    rchampagne

    212 posts

    that works! thank you very much!!!

  • #5 / Sep 07, 2010 1:51pm

    rchampagne

    212 posts

    @earthisland,

    Have you had any issues with this in an edit form?

    If I use the same concept, it doesn’t retrieve the text from that field anymore. here is the text area. I am using the solspace form helper with it.

    <h6>VisitDetails <div class="required">Required</div></h6>
    <p>                <div class="spacer"></div><br />
                        <textarea name="{exp:form_helper:field_grabber field_name="ft_description"}" cols="66" rows="15"><br />
                            {ft_description}<br />
                        </textarea><br />
                    <div class="spacer"></div>

    Here is the script for initializing Tiny MCE

    ~script type="text/javascript" src="{sitelink}/system/scripts/tiny_mce/tiny_mce.js"~
    ~/script~
            ~script type="text/javascript"~
            tinyMCE.init({
                theme : "advanced",
                mode : "textareas",    
                skin : "o2k7",
                skin_variant : "black",
                 // Advanced Theme
                theme_advanced_blockformats : 'p,h1,h2,h3,h4,h5,h6,code',
                theme_advanced_toolbar_location : 'top',
                theme_advanced_toolbar_align : 'left',
                theme_advanced_statusbar_location : 'bottom',
                theme_advanced_resize_horizontal : false,
                theme_advanced_resizing : true,
    
                /* 
                  Basic configuration
                  My Favs - Simple but effective
                */
                plugins : 'safari,pagebreak,style,inlinepopups,media,contextmenu,paste,'
                    + 'fullscreen,xhtmlxtras',
                theme_advanced_buttons1 : 'cut,copy,pastetext,|,formatselect,|,'
                    + 'link,unlink,|,image,|,visualaid,fullscreen,|,cleanup,removeformat,code',
                theme_advanced_buttons2 : 'bold,italic,strikethrough,acronym,abbr,ins,del,nonbreaking,|,bullist,numlist,indent,outdent,',
                theme_advanced_buttons3 : '',
               
            });
    ~/script~

    If I comment out the script in the header of the page, and reload the page, the edit form display’s the field’s information fine, the a standard text area. If I remove the comments and initialize the script, tiny MCE display’s fine, the field information is blank, and I cannot edit the form.

    Very strange quirks.

    Anyone have an issue like this?

  • #6 / Sep 13, 2010 5:58pm

    earthisland

    46 posts

    I haven’t used SAEF for editing, and it’s definitely something my users ask for.

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

ExpressionEngine News!

#eecms, #events, #releases