如何在经典的asp中创建html文本编辑器 [英] how to create html text editor in classic asp

查看:191
本文介绍了如何在经典的asp中创建html文本编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



i当impliments项目有一些问题。我的问题是如何创建文本编辑器就像我在这个文本框中写我可以做的这个文字粗体,下划线,大,小我们总是在这个编辑器中使用这个选项,就像我想通过经典的asp和vb script.i没有想到这种类型的功能,如何做到这一点。



感谢先进!!

Dear Friends,

i have some problem when impliments projects.My problem is how to create text editor just like i am writing in this text box i can do in this text bold,underline,big,small we have always used this option in this editor just like i want to impliments this type of editor by classic asp and vb script.i didnt idea about this type of functionality how to do.

Thanks in advanced !!

推荐答案

在Javascript中完成所有文件编辑操作是可能的,也是有益的回帖。只有在极少数情况下,由于一个或另一个原因,才需要发布到站点:如果需要提交正在编辑的文本以进行某些复杂的服务器端操作;其他请求将是获取,并且非常罕见,如果有的话。



因此,拥有ASP.NET,ASP或任何其他服务器端技术并不重要。



现在,这是基本的想法。用HTML编写这个简单的代码示例:

It's possible and beneficial to do all the file editing operation in Javascript, without post back. Only in rare cases, for one or another reason, posting to the site would be required: if one needs to submit the text being edited for some complex server-side operation; other requests would be "get", and also pretty rare, if any at all.

Therefore, having ASP.NET, ASP, or any other server-side technology does not matter much.

Now, here is the basic idea. Write this simple code sample in HTML:
<p contenteditable="true">This is an editable paragraph.</p>



(样本取自 http://www.w3schools.com/tags/att_global_contenteditable.asp [< a href =http://www.w3schools.com/tags/att_global_contenteditable.asptarget =_ blanktitle =New Window> ^ ]。)



如果单击此段并尝试粘贴一些彩色/格式化的片段文本,您将看到不同的颜色和字体将起作用。试试这个:


(The sample is taken from http://www.w3schools.com/tags/att_global_contenteditable.asp[^].)

If click on this paragraph and you try to paste some colored/formatted fragment text, you will see that different colors and fonts will work. Try also this:

<p contenteditable="true">This is an editable paragraph. <span style="color:red">This text is colored.</span></p> 





这是您使用样式和所有格式设置功能开发整个HTML编辑器的方法。您只需要创建一些带有样式和格式的菜单/工具栏;并且对这些菜单项或工具栏按钮的点击应该使用适当的样式修改内容。你也可以添加CSS编辑器(可以是简单的文本编辑器)。



此外,你可以找到大量的Javascript HTML编辑器,看看它是如何工作的。例如,请参阅以下内容:

http://en.wikipedia.org/wiki/TinyMCE [ ^ ],

http://www.tinymce.com/ [ ^ ]。



-SA


这篇关于如何在经典的asp中创建html文本编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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