简体   繁体   English

使用tinyMCE时如何保存数据?

[英]How can I save my data when using tinyMCE?

I have the following code: 我有以下代码:

<textarea cols=100 rows=15 style="width: 825px;" 
                        class="mceEditor"
                        id="Text" 
                        name="Text">@Model.Text</textarea>

When my code runs I do tinyMCE.init and this creates the following HTML: 当我的代码运行时,我执行tinyMCE.init,这将创建以下HTML:

<textarea name="Text" id="mce_43" class="mceEditor wijmo-wijtextbox ui-widget ui-state-default ui-corner-all" style="width: 825px; display: none;" rows="15" cols="100" aria-hidden="true"><p>test data</p></textarea>

followed by code for the tinyMCE window with the correct text in the window. 然后是tinyMCE窗口中带有正确文本的代码。

But when I make a change to the data and click submit on the form then the original data is returned and nothing of the data that I changed in the tinyMCE window is stored. 但是,当我对数据进行更改并单击表单上的提交时,将返回原始数据,并且不会存储在tinyMCE窗口中更改的任何数据。

Is there something else I need to do to have the data from the window stored? 我还需要做些其他事情来存储窗口中的数据吗?

发送数据之前,请尝试tinyMCE.triggerSave()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM