I am having a problem with Tinymce which has only started occuring recently. I have a PHP page with Tinymce on it. When I click the submit button to save the changes to TinyMCE, it does NOT save the styling – font size, bold, images etc, but only saves the text. It inserts it into my SQL database.
I feel it is something to do with the p tag, because before the problem occured, all submitted pieces of text were wrapped inside p tags, whereas they aren’t now.
I have no idea what is wrong though! The text is not inserting using something like filter(), so no PHP strings are making the errors.
Tinymce header:
<script type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "exact",
plugins : "emotions,spellchecker,fullscreen",
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,justifyleft, justifycenter,justifyright,justifyfull,separator,fontsizeselect,fontselect,styleselect,forecolor,backcolor,image, separator,blockquote,link,emotions,spellchecker,fullscreen",
theme_advanced_buttons3_add : "fullpage",
editor_selector :"mceEditor",
elements : "tinyMCE",
skin : "o2k7",
skin_variant : "silver",
});
</script>
The textbox with Tinymce attached to it:
<td><textarea name="signature" align="left" style="width:760px;height:50px;" id="tinyMCE"><?php echo $lolassoc['signature']; ?></textarea></td>
The PHP query which inserts into the database (the post[‘signature’] part uses tinymce.
mysql_query("UPDATE users SET block_newfriends='$_POST[block_newfriends]', details='".clean($_POST['details'])."', accept_trading='clean($_POST[accept_trading])', hide_online='clean($_POST[hide_online])', signature='".$_POST['signature']."' WHERE id = '" . USER_ID . "'");
header("Location: ".WWW."/identity/settings");
If you need more clarification, please let me know. Thanks! 🙂
After a long while, I have found the issue. It was nothing to do with TinyMCE, it was a wierd script in one of my configuration files! Thanks for all the help guys!