Edit Area

Talk about new features for CMSMS and modules.
Post Reply
radoado
Forum Members
Forum Members
Posts: 31
Joined: Fri Sep 09, 2005 12:33 pm

Edit Area

Post 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]
cyberman

Re: Edit Area

Post 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  ::) ...
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Edit Area

Post 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...
cyberman

Re: Edit Area

Post 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 ...
Sub_Kovert

Re: Edit Area

Post by Sub_Kovert »

This would be a really nice addition
javathunderbird

Re: Edit Area

Post 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
Last edited by javathunderbird on Tue Apr 24, 2007 9:16 am, edited 1 time in total.
cyberman

Re: Edit Area

Post by cyberman »

Well done - thanx.
User avatar
Silmarillion
Dev Team Member
Dev Team Member
Posts: 483
Joined: Sun Jan 02, 2005 9:10 pm

Re: Edit Area

Post 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.
cyberman

Re: Edit Area

Post 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.
User avatar
Silmarillion
Dev Team Member
Dev Team Member
Posts: 483
Joined: Sun Jan 02, 2005 9:10 pm

Re: Edit Area

Post by Silmarillion »

I agree, and I volenteer to implement it for 2.0... It will happen :D
cyberman

Re: Edit Area

Post by cyberman »

That's are great news :)!
User avatar
Silmarillion
Dev Team Member
Dev Team Member
Posts: 483
Joined: Sun Jan 02, 2005 9:10 pm

Re: Edit Area

Post 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
Post Reply

Return to “Feature ideas”