本文介绍了在ASP.NET MVC中保存数据使用ckeditor内联的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我让项目使用asp.net mvc和CKEditor inline。我想将HTML文件中的可编辑文本区域字段保存到数据库中。我还是不知道该怎么做。我试图使用inlinesave插件,但它很困惑。有些人可以帮帮我吗?
我尝试过:
我想将HTML文件中的可编辑文本区域字段保存到数据库。
I made project use asp.net mvc and CKEditor inline. I want to save my editable text area field in HTML file to database. I still don't know how to do that. I tried to use inlinesave plug in but its confused. Could some body help me?
What I have tried:
I want to save my editable text area field in HTML file to database.
推荐答案
<div id="editor1" contenteditable="true">
<h1>Inline Editing in Action!</h1>
<p>The "div" element that contains this text is now editable.
</div>
<script>
var data = CKEDITOR.instances.editor1.getData();
// Your code to save "data", usually through Ajax.
</script>
这篇关于在ASP.NET MVC中保存数据使用ckeditor内联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!