Solved

how to get the id and name of fck editor?

Posted on 2009-07-10
2
259 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

772 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