Is there a way to get the content back into fck? Am I missing something? Im trying to insert content Ive checked back in... The insert code is on the same page like:
Is this possible?!
<?php // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. //$sBasePath = $_SERVER['PHP_SELF'] ; //$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ; $sBasePath = '/var/www/html/admin/rte/editor/'; $oFCKeditor = new FCKeditor('FCKeditor1') ; $oFCKeditor->BasePath = $sBasePath ; $oFCKeditor->Value = $content; $oFCKeditor->Width = '100%' ; $oFCKeditor->Height = '600' ; $oFCKeditor->Create() ; ?>
Is this possible?!
RE: How to put content back?!
You're trying to put content back into the FCKEditor - which is done by passing the following:
$oFCKeditor->Value = $content;
Where $content is the content you wish to load in.
Are you having trouble passing info in in this way or are you having trouble because the checking of the content and the insertion of the content are on the same page?
Please elaborate.
RE: How to put content back?!
newcontent = this.wordWin.textInputs[i];
var oEditor = FCKeditorAPI.GetInstance( "FCKeditor1" );
oEditor.SetHTML(newcontent);
Its now being put back, but my new issue is with ie and type mismatch. This works in ff, but not ie Is there another way to assign it back?
Thanks, John
RE: How to put content back?!
Ive been working on the same thing, no luck... Trying to use all types of js ways to get my content back... I can get it, do what I want with it, but cant get it back in the box
RE: How to put content back?!
// select node, e.g. select the parent node
FCKeditorAPI.GetInstance("FCKeditor1").Selection.SelectNode(FCKeditorAPI.GetInstance("FCKeditor1").Selection.GetParentElement());
// Fetching the actual content of the selection can't be done through the 'Selection' Object...
if (document.all)
{
alert('step1');
var content = FCKeditorAPI.GetInstance("FCKeditor1").EditorDocument.selection.createRange().text;
}
else
{
var content = FCKeditorAPI.GetInstance("FCKeditor1").EditorWindow.getSelection();
}
content = String(content);
content = "" + content;
document.getElementById('contentcopy').value = content;
var text1 = document.getElementById('contentcopy');
var speller = new spellChecker( text1 );
speller.openChecker();
}
-----------------------------------------------------------------------
think this works, heres where i set it back
if( this.wordWin.textInputs[i] ) {
newcontent = this.wordWin.textInputs[i];
var oEditor = FCKeditorAPI.GetInstance( "FCKeditor1" );
oEditor.SetHTML(newcontent);
}
is there another way?
RE: How to put content back?!
So you get the content, spellcheck it and then you re-draw the page with FCKeditor in with the new content rather than trying to do it on one page?
RE: How to put content back?!
FCKeditorAPI.GetInstance("FCKeditor1").Selection.SelectNode(FCKeditorAPI.GetInstance("FCKeditor1").Selection.GetParentElement());
// Fetching the actual content of the selection can't be done through the 'Selection' Object...
if (document.all)
{
alert('step1');
var content = FCKeditorAPI.GetInstance("FCKeditor1").EditorDocument.selection.createRange().text;
}
else
{
var content = FCKeditorAPI.GetInstance("FCKeditor1").EditorWindow.getSelection();
}
RE: How to put content back?!
FCKeditorAPI.GetInstance("FCKeditor1").Selection.SelectNode
Any ideas on how else i can take the content out of the box? It seems that putting it back is the easy part lol
SOrry for so many posts,
John