TinyMCE没有发送价值 [英] TinyMCE not sending value

查看:86
本文介绍了TinyMCE没有发送价值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi All

这是我第一次使用Tiny Mce而且我遇到了问题。请帮助

Hi All
It's the first time I've used Tiny Mce and I have a problem. Please Help

编辑器在编辑时工作正常但当我点击提交时,没有从textarea输入发送任何内容

The editor works fine in editing but when I click submit nothing is sent from the textarea input

以下是代码:

<textarea name='proddesc' class='text_area' id='elm1' /></textarea>

我正在使用jQuery,这是代码:

I'm using jQuery, this is the code:

$('#addprod').submit(function(){
                $("#addprodmsg").hide();
        $.post('addprod.php', $("#addprod").serialize(), 
            function(data){
                    $("#addprodmsg").html(data);
        });
                $("#addprodmsg").show();
                return false;
});

Php代码是:

foreach($_POST as $key){echo "<script>alert('$key')</script>";}

一切都警告一个值,但textarea没有提醒任何事情。

Everything alerts a value but the textarea is not alerting anything.

另外,当我禁用TinyMce时并提交表格一切正常。

Also, when I disabled TinyMce and submit the form everything is ok.

2 - 我正在使用rtl方向,我有这张照片:

2 - I'm using the rtl direction and I have this photo:

http://www.image-upload.net/images/mly8a68ufs0mdeky6low.jpg

看看风格:(

谢谢

推荐答案

有必要更新textareas内容与编辑器iframe的内容(tinymce使用像大多数rtes一样的可编辑iframe)。为了实现这一点,你需要调用 tinymce.get('elm1')。save(); 在你提交之前。

It is necessary to update the textareas content with the content of the editors iframe (tinymce uses an editable iframe like most rtes). In order to achieve this you need to call tinymce.get('elm1').save(); before you submit.

你也可以使用 tinymce.get('elm1')来获取编辑内容.getContent( ); 并发送this.t

You can also grab the editors content using tinymce.get('elm1').getContent(); and sent this.t

这篇关于TinyMCE没有发送价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆