hmm, it appears the instanceName is what I should use to reference the edit area, but I get a runtime error when I try to push content to it. Anyone know if there is a specfic way I should call the edit area if I want to insert HTML content in it dynamically?
I figured out why I was not seeing the text I was passing to the editor textarea object; it was being passed to the code portion of the editor that is not visible until you make it visible.
Here is the correct way to push contet directly to the design view of the textarea object.
<div align="center" bgcolor="#FF0000"><font size="2" face="Arial, Helvetica, sans-serif"><strong>Gib hier die neuen Konzertdaten ein.</strong></font><BR>
I did set up the name/id for the "textarea" like this: (in the actuall file where you have to FCK, ie sampe) $oFCKeditor = new FCKeditor('html') ; //<--html is the name of the FCKEditor $oFCKeditor->Value = $data['html'] ; //value where i take out info from database $oFCKeditor->Create() ; //this creates everything
RE: Anyone know the ID or Name for the edit area?
RE: Anyone know the ID or Name for the edit area?
RE: Anyone know the ID or Name for the edit area?
var content = "some text";
document.frames('iframe_EditorDefault').document.getElementById('txtSource').value = content;
I can view the new pushed content by using and alert to show me the new contents, yet the textarea refuses to actually display the text.
Anyone have any idea how to work with this class/object to get it to display contents I am sending to it?
RE: Anyone know the ID or Name for the edit area?
I figured out why I was not seeing the text I was passing to the editor textarea object; it was being passed to the code portion of the editor that is not visible until you make it visible.
Here is the correct way to push contet directly to the design view of the textarea object.
document.frames("iframe_#instanceName#").document.all.objContent.DOM.body.innerHTML = content;
Where "content" is the html or text you want to pass.
Enjoy
RE: Anyone know the ID or Name for the edit area?
<form name="form1" method="post" action="">
<?php $feditor = new FCKeditor ; $feditor->Value = $_POST['content_html']; $feditor->ToolbarSet = 'custcontent'; $feditor->CreateFCKeditor( 'content_html', 525, 300) ; ?>
<input type="submit" name="Submit" value="Submit" onClick="var content; content='hello world'; document.frames('iframe_content_html').document.all.objContent.DOM.body.innerHTML = content">
<textarea name="textarea" cols="40" rows="20"></textarea>
</form>
Any suggestions? Thanks
--Jeff
RE: Anyone know the ID or Name for the edit area?
id =\"iframe_#instanceName#\"
It should be added anywhere inside the <IFRAME tag.
RE: Anyone know the ID or Name for the edit area?
$HTMLEditor = new FCKeditor ;
if (isset($ID))
{
$HTMLEditor->Value=$Art_Content;
}
$HTMLEditor->CreateFCKeditor('EditorDefault', '100%', 500)
Note: checked the $_POST value first using "isset()" and then assigned the value to $ID.
$Art_Content is the string holding the HTML code.
RE: Anyone know the ID or Name for the edit area?
thats my code so far:
<form action="testsubmit.php" target="_blank" method="post" language="javascript">
<div align="center" bgcolor="#FF0000"><font size="2" face="Arial, Helvetica, sans-serif"><strong>Gib
hier die neuen Konzertdaten ein.</strong></font><BR>
<?php $oFCKeditor = new FCKeditor ; $oFCKeditor->Value = 'test'; $oFCKeditor->CreateFCKeditor( 'notneeded', '100%', 200 ) ; ?>
<BR>
<INPUT type="submit" value="abschicken" onClick="var content = 'hello world'; document.frames("iframe_#instanceName#").document.all.objContent.DOM.body.innerHTML = content">
<BR>
</div>
</form>
</BODY>
</HTML>
Like suggested i also changed the fckeditor.php file.
As im still a beginner im unsure where to put my template .html file.
RE: Anyone know the ID or Name for the edit area?
I did set up the name/id for the "textarea" like this:
(in the actuall file where you have to FCK, ie sampe)
$oFCKeditor = new FCKeditor('html') ; //<--html is the name of the FCKEditor
$oFCKeditor->Value = $data['html'] ; //value where i take out info from database
$oFCKeditor->Create() ; //this creates everything