Hi,
Im trying to get a string from database and set the Value of FCKeditor to that.
Cant figure this small problem out. Could someone give me an hint? Im using asp.net.
Ive tried Value='<%=strData%>'
/banski
/Banski
Im trying to get a string from database and set the Value of FCKeditor to that.
Cant figure this small problem out. Could someone give me an hint? Im using asp.net.
Ive tried Value='<%=strData%>'
/banski
/Banski
RE: Set Value
i had alot of trouble with this.. but here is some sample php code that i ran on my string to make 100 percent sure that my javascript string was acceptable:
$result = $db->Execute("SELECT Body FROM section WHERE SectionID = '$_GET[id]'");
$body = addslashes($body);
$body = str_replace("\n","", $result->fields[Body]);
$body = str_replace("\r","", $body);
$body = htmlentities($body);
?>
<!--
var oFCKeditor;
oFCKeditor = new FCKeditor("EditorDefault","", "500");
oFCKeditor.Value = "'.$body.'";
oFCKeditor.Create();
//-->
i hope this has been helpful
- Jonathan P Dryhurst Roberts
- Tranceport Technology Group
RE: Set Value
You could have an ASP page with all your variables that overide the existing ones and then incluse that as the .JS file instead. This will work
RE: Set Value
For example <div id="someId" style="DISPLAY: none">$body</div>
When the document is loaded assign the innerHTML of the <div> to the editor via javascript.
This method however puts requirements to the browser .
RE: Set Value
Re: Set Value
Has anyone got a solution on this problem? I spend hours and days and can't figure it out. Supports the new version this?
The problem is, that after the fckeditors (i have four in one page) has loaded, i need to place text over an javascript or something else in a specific fckeditor textarea.
When i open the page in edit and the textarea which is replaced with fckeditor has a value, this value would be correctly set into the replaced new textarea. has the new version also the iframe? how can i get access to this...
can somebody help me on this? thanks in advance and greetings,
cryo
Re: Set Value
Hello @ all.

I am still having the problem. Can anybody help please?
I want to set a value into a loaded fck editor textbox over javascript. thats all.......
greez, cryo
Re: Set Value
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn