textarea中的HTML5富文本 [英] HTML5 rich-text inside textarea

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

问题描述

我听说新的HTML5将为textareas添加丰富的文本功能(它会使它们更加灵活),所以你可以做一些像代码语法高亮编辑器而没有非常讨厌的javascript(例如创建iframe和东西)。 >

这是真的吗?是否有支持它的浏览器?我在哪里可以找到一些API?

解决方案

NO - jQuery



如果您在寻找(与我相同)的是NO-jquery工具(纯HTML / CSS +基本JS),那么我发现的一些最佳选择是:


  1. wysihtml5

  2. Squire

  3. ckeditor

  4. widgEditor

然而,上面列表中的所有人都转换了元素(textarea)放入iframe中,所以它们不是我正在搜索的内容,最后我发现这个尊重原始元素(div等),但是如果使用textarea,它会创建额外的div),allowi ng完全直接的JS应用程序开发:
$ b


  1. niceit

希望这可以帮助您!


I heard that the new HTML5 will add rich text capability to textareas (it will make them more flexible), so you can do stuff like code syntax highlighting editors without very nasty javascript (like creating iframes and stuff).

Is this true? Are there browsers with support for it yet? And where can I find some API?

解决方案

NO - jQuery

If what you where looking for (the same as me) is NO-jquery tools (pure HTML/CSS + basic JS), then some of the best options I found are:

  1. wysihtml5
  2. Squire
  3. ckeditor
  4. widgEditor

Nevertheless, those in the list above all convert the element (textarea) into an iframe, so they weren't exactly what I was searching for, finally I found this one which respects the original element (divs or so, but if you use textarea it does creates an additional div), allowing full straightforward JS app development:

  1. nicedit

Hope this helps you too!

这篇关于textarea中的HTML5富文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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