Edit Area
Edit Area
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]
[gelöscht durch Administrator]
Re: Edit Area
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
...

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

Re: Edit Area
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...
I saw it on http://dynamicdrive.com some FAQ or something...
Re: Edit Area
Please tell us more about you've tried to integrate EditArea - it makes easier to helpradoado wrote: I try integrate EditArea editor

Have you got an js error ?but scripts from EditArea don't working with scripts Scriptaculous (when is Scriptaculous disabled, thus EditArea working).
If I'm right Scriptaculous is currently used only in listcontent.php ...
Re: Edit Area
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
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.
- Silmarillion
- Dev Team Member
- Posts: 483
- Joined: Sun Jan 02, 2005 9:10 pm
Re: Edit Area
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.
sil.
Re: Edit Area
Maybe it should possible to choose more than editorSilmarillion wrote: but unfortunately this does not support css/template textareas yet. Some solution to this should be made for CMSms 2.0.

- Silmarillion
- Dev Team Member
- Posts: 483
- Joined: Sun Jan 02, 2005 9:10 pm
Re: Edit Area
I agree, and I volenteer to implement it for 2.0... It will happen 

- Silmarillion
- Dev Team Member
- Posts: 483
- Joined: Sun Jan 02, 2005 9:10 pm
Re: Edit Area
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
Please report any problems, if you try it out!
Best regards
Morten/Silmarillion