简体   繁体   English

使用Ajax保存所见即所得编辑器内容

[英]Saving wysiwyg Editor content with Ajax

I am writing a cms (on .net) and have structured the whole page to work client side. 我正在(.net)上编写一个cms,并已将整个页面结构化以工作客户端。 There is a treeview that lets you add/remove/move items and define their names in the languages defined. 有一个树状视图,可让您添加/删除/移动项目并以定义的语言定义其名称。 For each language I save the names of the category defined, but when there is HTML content associated with it, i fall into the JavaScript serializer problem that finds the content too long to be serialized. 对于每种语言,我保存定义的类别的名称,但是当存在与之关联的HTML内容时,我陷入了JavaScript序列化程序问题,该问题发现该内容太长而无法序列化。

What would be the best approach to make sth like this work. 什么是做某事这样的最好方法。 Shall I change everything to work with postbacks, or try to manually call _doPostBack for the editor content (which I don't want). 我应该更改所有内容以使用回发,还是尝试手动调用_doPostBack作为编辑器内容(我不想要)。 Thank you in advance. 先感谢您。

I guess would be great to make auto-save with time interval which will submit only diffs between current state and previous save. 我想以时间间隔进行自动保存会很棒,它将仅提交当前状态和先前保存之间的差异。 It will do the key if the user will edit it manually, not for copy/paste, of course. 如果用户手动编辑密钥(当然不是复制/粘贴),它将执行密钥。 It is if we talk about really big data that we need to save. 如果我们谈论的是真正需要保存的大数据。 Otherwise need to find some ways to compress the data before submitting: json+base64, etc. 否则需要在提交之前找到一些压缩数据的方法:json + base64等。

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

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