Jump to content

[SOLVED] rich text editor help


Nothadoth

Recommended Posts

im using a prescripted editor. i've managed to get it to work previously, but now it wont. im even using the exact same code i used to use.

 

the problem i'm having is that when the form is submitted it won't carry the variable and display it in the alert box.

 

here is the code:

<form name="editcont" action="admin2.php?page=contedit&id=<?php echo $editcont['id']; ?>" method="post" onsubmit="return submitForm();">

<script language="JavaScript" type="text/javascript">
<!--
function submitForm() {
//make sure hidden and iframe values are in sync before submitting form
//to sync only 1 rte, use updateRTE(rte)
//to sync all rtes, use updateRTEs
//updateRTE('rte1');
updateRTE('rte');
alert("rte = " + document.editcont.rte.value);


//change the following line to true to submit form
return false;
}

//Usage: initRTE(imagesPath, includesPath, cssFile)
initRTE("images/", "", "");
//-->
</script>
<noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript>

<script language="JavaScript" type="text/javascript">
<!--
//Usage: writeRichText(fieldname, html, width, height, buttons, readOnly)
writeRichText('rte', '', 520, 200, true, false);
//-->
</script>
<p><input type="submit" name="rtenewcont" value="Save new Content"></p>
</form>

 

there are other files to go with it, but they are just css styling files and a javascript file that just has the html coding etc. for the rich text editor.

 

someone please help, thank you

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.