Nothing happens on form submission
forms, jquery, php, rich-text-editor, tinymce
Solution
I've faced a situation once like yours and what I did that was first i set in `tinyMCE.init`
tinyMCE.init({
mode : "exact", // Used exact
elements : "page_content", // I gave the textarea id and name 'page_content'
...
});
Then I've wrote a function as follows
function get_page_content()
{
var ed = tinyMCE.get('page_content');
return ed.getContent();
}
Then inside my form submit event handler/function I just did
$('#page_content').val(get_page_content()); // I populated my textarea (id=page_content) before the form submission
I received the data using `$page_content=$_POST['page_content']` in my php script
Update: May be you can use
var ed=tinyMCE.activeEditor.getContent(); // when you didn't set the mode : "exact" in init function
Reference: getContent and setContent
May be not a solution but If this helps then I'll be glad to know. Also notice Sparky672's comment.
Problem
I applied tinyMCE to a text area in my sites admin area. Now there is a page "create category" and and page "edit category." In edit category, there is a drop-down of the categories, I select one and the text area for category description is filled in with AJAX and a tinyMCE function:_ ``` tinyMCE.activeEditor.setContent(responce); ``` The category description is filled into the text area on which tinyMCE is applied. But when I click submit, NOTHING happens at all.Similarly, on the create category page, there is no drop down, but when you click submit, nothing happens at all. This problem does not occur when tinyMCE is not applied. But on the edit category page, it was submitting but not filling in the text area with the category description, when instead of ``` tinyMCE.activeEditor.setContent(responce); ``` I used ``` $("#lang_description").html(responce); ``` in the callback function for jQuery AJAX. So the main problem is that the forms are not being submitted and that was the story. Someone suggested to use the tinyMCE function getContent before I post but I dont understand where and how I would do that.