Solved

how to get the id and name of fck editor?

Posted on 2009-07-10
2
258 Views
Last Modified: 2012-08-14
unable to get the editor value. i am using the fck editor instead of textarea.

in case of textarea, it is easy to simply write the id and name like this.
<textarea rows="10" cols="10" name="try" id="try"></textarea>

we can easily get the id in this case.

but i am using fck editor. how can i assign id and name to it. name actually i know

include("fckeditor/fckeditor.php");
$content = $content_value ;
$hello = new FCKeditor('content1'); //content1 is the name ok
$hello->BasePath = '/new/modified_cms/login/fckeditor/';
$hello->Value = $content;
$hello->Create();*/

where is the id i can define?



0
Comment
Question by:designersx
2 Comments
 
LVL 3

Expert Comment

by:Michal-Drozd
ID: 24823842
you have to edit FCKeditor/fckeditor.php

change line

$Html .= "<textarea name=\"{$this->InstanceName}\" rows=\"4\" cols=\"40\" style=\"width: {$WidthCSS}; height: {$HeightCSS}\">{$HtmlValue}</textarea>" ;

to

$Html .= "<textarea name=\"{$this->InstanceName}\" id=\"{$this->InstanceName}\" rows=\"4\" cols=\"40\" style=\"width: {$WidthCSS}; height: {$HeightCSS}\">{$HtmlValue}</textarea>" ;
0
 
LVL 9

Accepted Solution

by:
xBellox earned 125 total points
ID: 24823883
Usually, FCKeditor set the same value to ID and NAME properties.

You can view your source code to be sure.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now