Skip to content

Commit

Permalink
Added more information to the simple demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Blum committed Jun 21, 2011
1 parent bc93695 commit 6ee1618
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
1 change: 0 additions & 1 deletion examples/advanced.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

<style>
body {
background: #ccc;
font-family: Verdana;
font-size: 11px;
}
Expand Down
18 changes: 16 additions & 2 deletions examples/simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

<style>
body {
background: #ccc;
font-family: Verdana;
font-size: 11px;
}
Expand Down Expand Up @@ -68,6 +67,11 @@

<h1>wysihtml5 - Simple Editor Example</h1>

<p>
Uses a custom rule set that allows the following elements: <em>strong, b, em, i, a, span</em><br>
Links will automatically receive <i>target="_blank"</i> and <i>rel="nofollow"</i>. Check the source code of this page.
</p>

<form>
<div id="toolbar" style="display: none;">
<a data-wysihtml5-command="bold" title="CTRL+B">bold</a> |
Expand All @@ -88,7 +92,17 @@ <h2>Events:</h2>
<script>
var editor = new wysihtml5.Editor("textarea", {
toolbar: "toolbar",
parserRules: { tags: { br: {}, strong: {}, b: {}, i: {}, em: {}, span: {}, a: {} } }
parserRules: {
tags: {
br: true,
strong: true,
b: true,
i: true,
em: true,
span: true,
a: { check_attributes: { href: "url" }, set_attributes: { rel: "nofollow", target: "_blank" } }
}
}
});

editor
Expand Down

0 comments on commit 6ee1618

Please sign in to comment.