html5 在线富文本编辑器怎么用

html-css019

html5 在线富文本编辑器怎么用,第1张

html5 在线富文本编辑器方法步骤:

<!DOCTYPE html>

<html>

<head>

<title>Images upload</title>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width">

<link rel="stylesheet" type="text/css" href="../css/style.css" />

<script type="text/javascript" src="../lib/jquery-1.7.min.js"></script>

<link rel="stylesheet" href="../redactor/css/redactor.css" />

<script src="../redactor/redactor.js"></script>

<script type="text/javascript">

$(document).ready(

function()

{

$('#redactor_content').redactor({ imageUpload: '../demo/scripts/image_upload.php' })

}

)

</script>

</head>

<body>

<div id="page">

<textarea id="redactor_content" name="content" style="height: 460px">

<h2>Hello and Welcome</h2>

<p>I never did quite grasp him, though he endeavored to explain it to me upon numerous occasions. I suggested telepathy, but he said no, that it was not telepathy since they could only communicate when in each others' presence, nor could they talk with the Sagoths or the other inhabitants of Pellucidar by the same method they used to converse with one another.</p>

<p>"What they do," said Perry, "is to project their thoughts into the fourth dimension, when they become appreciable to the sixth sense of their listener. Do I make myself quite clear?"</p>

<p>"You do not, Perry," I replied. He shook his head in despair, and returned to his work. They had set us to carrying a great accumulation of Maharan literature from one apartment to another, and there arranging it upon shelves. I suggested to Perry that we were in the public library of Phutra, but later, as he commenced to discover the key to their written language, he assured me that we were handling the ancient archives of the race.</p>

<p>During this period my thoughts were continually upon Dian the Beautiful. I was, of course, glad that she had escaped the Mahars, and the fate that had been suggested by the Sagoth who had threatened to purchase her upon our arrival at Phutra. I often wondered if the little party of fugitives had been overtaken by the guards who had returned to search for them. Sometimes I was not so sure but that I should have been more contented to know that Dian was here in Phutra, than to think of her at the mercy of Hooja the Sly One. Ghak, Perry, and I often talked together of possible escape, but the Sarian was so steeped in his lifelong belief that no one could escape from the Mahars except by a miracle, that he was not much aid to us—his attitude was of one who waits for the miracle to come to him.</p>

</textarea>

</div>

</body>

</html>

1. Mercury : HTML5 Powered WYSIWYG Editor

Mercury 是个全功能的编辑器,包含TinyMCE和CKEditor同样的功能,但又有不同的特性。与iFrames有所不同,它使用了HTML5内容可编辑功能等。Mercury 是由CoffeeScript代码编写,其支持所有的主流浏览器。

Website/Downoad

2 Aloha Editor – HTML5 WYSIWYG Editor

Aloha Editor 是个基于浏览器的富文本编辑器框架。不像其他大多数的HTML编辑器,Aloha可以被嵌入到CMS、Blog,及其他标准的web开发框架中。

Website

3. Rendra- Online HTML 5 Editor

Rendra 是个在线HTML5 编辑器,支持用户实时预览,用户可以使用哪个浏览器支持的HTML 5和CSS 3,以及HAML 和SASS。它是由CoffeeScript 和 Sinatra代码编写的。用户可以用Rendra测试JS代码,允许用户利用 jQuery UI,jQuery 工具和插件。

Website

4. BlueGriffon: Next Generation HTML5 WebEditor

BlueGriffon是一个新的WYSIWYG编辑器,跨平台, 支持Windows, Linux and Mac OSX。 该编辑器内置HTML5/CSS3编辑功能,可以轻松地用它来实现传输、文本和边框的阴影、斜体等效果。它使用Google Font Directory 和FontSquirrel addons,可以设置个性化网页字体。

Website

5. Maqetta : Open Source Project &HTML5 Editor

Maqetta,一个创建桌面和移动用户界面的HTML5设计编辑工具,并同时宣布将项目捐助给开源机构Dojo基金会。

Maqetta已经是开源项目,提供WYSIWYG可视化HTML5用户界面设计功能,仅需简单的拖曳操作,支持桌面和移动用户界面。

6. Apatana Studio 3

Aptana Studio 3 是开源web开发工具,它允许开发者测试web应用,支持最新的web开发技术如HTML5, CSS3, JavaScript, Ruby, Rails, PHP 和 Python。Apatanna包含很多的功能,比如GIF integration, HTML,CSS和JavaScript Code assists, integrated debugger, 部署向导,以及IDE定制化。

两种主题

toolbar的自定义:

quill取消了getHtml()的API,getContents()返回的是Delta对象,一种JSON数组,getText()返回文本域里对应字符串。

因平台需将用户编辑的格式传回后台生成邮件的正文,而邮件的正文是Html格式,通过查issue找到获取Html的方法: quill.container.firstChild.innerHTML