Page 1 of 1

Edit Area

Posted: Tue Oct 24, 2006 8:42 pm
by radoado
I try integrate EditArea editor http://www.cdolivet.net/editarea/editar ... _full.html in CMSMS (CSS and HTML highlight code), but scripts from EditArea don't working with scripts Scriptaculous (when is Scriptaculous disabled, thus EditArea working).

[gelöscht durch Administrator]

Re: Edit Area

Posted: Wed Oct 25, 2006 5:13 am
by cyberman
Looks great - think that's a must have for CMSms default :) ...

Haven't tried yet but if I'm right EditArea use JavaScript too, so there can be a conflict with Scriptaculous  ::) ...

Re: Edit Area

Posted: Wed Oct 25, 2006 6:19 am
by Dr.CSS
There is a way to get 2 js to run on one page, something about using the "body onload" call for both of them.

I saw it on http://dynamicdrive.com some FAQ or something...

Re: Edit Area

Posted: Wed Oct 25, 2006 6:29 am
by cyberman

Re: Edit Area

Posted: Thu Jan 11, 2007 9:11 am
by cyberman
radoado wrote: I try integrate EditArea editor
Please tell us more about you've tried to integrate EditArea - it makes easier to help  :).
but scripts from EditArea don't working with scripts Scriptaculous (when is Scriptaculous disabled, thus EditArea working).
Have you got an js error ?

If I'm right Scriptaculous is currently used only in listcontent.php ...

Re: Edit Area

Posted: Wed Feb 07, 2007 11:10 pm
by Sub_Kovert
This would be a really nice addition

Re: Edit Area

Posted: Tue Apr 24, 2007 8:55 am
by javathunderbird
Hi,
  I've created a hacking solution to this problem. Here's what I did:
  1. In admin/edittemplate.php, look for the line    include_once("header.php");
                                                          right before this line add    $_SESSION['is_edit_template'] = 1;
                                            right after this line add unset($_SESSION['is_edit_template'] );
      Thus the snippet looks like:

      $_SESSION['is_edit_template'] = 1;
   
      include_once("header.php");

      unset($_SESSION['is_edit_template']);


  2. In admin/themes/default/defaultTheme.php, override the function OutputHeaderJavascript() with the following:

      echo '';

      echo '';
   
    echo '';
   
    if($_SESSION['is_edit_template'] == 1){
      //added by jimthunderbird, editarea library for template editing
    echo '';
   
  echo '
     
// initialisation
editAreaLoader.init({
id: "content" // id of the textarea to transform
,start_highlight: true // if start with highlight
,allow_resize: "both"
,allow_toggle: true
,language: "en"
,syntax: "html"
});





   
   
   
    ';
   
}
else{

     
  echo '';
 
    }

    3. Though minor but I found this tricky, in admin/edittemplate.php, look for the code:
       
        Change it to :
       

        The name and id of the textarea should be diferrent name.


    This concludes my quick hack, though is not even a good one, but it works for me.

With my best,
Jim

Re: Edit Area

Posted: Tue Apr 24, 2007 9:23 am
by cyberman
Well done - thanx.

Re: Edit Area

Posted: Tue Apr 24, 2007 12:41 pm
by Silmarillion
Edit Area is also implemented as a wysiwyg-module, but unfortunately this does not support css/template textareas yet. Some solution to this should be made for CMSms 2.0.

sil.

Re: Edit Area

Posted: Tue Apr 24, 2007 12:48 pm
by cyberman
Silmarillion wrote: but unfortunately this does not support css/template textareas yet. Some solution to this should be made for CMSms 2.0.
Maybe it should possible to choose more than editor  ::) ... one for content/gcb/news, another one for templates/css/userdefined tags.

Re: Edit Area

Posted: Tue Apr 24, 2007 1:21 pm
by Silmarillion
I agree, and I volenteer to implement it for 2.0... It will happen :D

Re: Edit Area

Posted: Wed Apr 25, 2007 4:46 am
by cyberman
That's are great news :)!

Re: Edit Area

Posted: Thu May 03, 2007 11:05 pm
by Silmarillion
Actually this functionality is now in cmsms-core for the upcoming 1.1 release. You can try it out by installing svn-version of core and installing the EditArea-module.

Please report any problems, if you try it out!

Best regards
Morten/Silmarillion