Skip to content

Instantly share code, notes, and snippets.

@shgysk8zer0
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shgysk8zer0/62ae410717617049a094 to your computer and use it in GitHub Desktop.
Save shgysk8zer0/62ae410717617049a094 to your computer and use it in GitHub Desktop.
HTML5 WYSIWYG Editor
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
if (! ('forEach' in NodeList.prototype)) {
NodeList.prototype.forEach = Array.prototype.forEach;
}
if (! ('import' in HTMLLinkElement.prototype)) {
var script = document.createElement('script');
document.head.appendChild(script);
script.asrc = true;
script.src = location.pathname + "htmlimport.js";
}
window.addEventListener('load', function() {
if ('contextMenu' in HTMLElement.prototype) {
var imported = document.querySelector('link[rel="import"][name="WYSIWYG"]').import;
var content = imported.body.firstElementChild;
var menu = document.body.insertBefore(content, document.body.firstElementChild);
WYSIWYG(menu);
document.querySelector('[contenteditable="true"]').setAttribute('contextmenu', 'wysiwyg_menu');
}
});
if (! ('import' in HTMLLinkElement.prototype)) {
Object.defineProperty(HTMLLinkElement.prototype, 'import', {
get: function() {
var xhr = new XMLHttpRequest();
xhr.open('GET', this.href, false);
xhr.send();
return new DOMParser().parseFromString(xhr.response, "text/html");
}
});
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML5 WYSIWYG Editor</title>
<!-- <base href="../../"> -->
<link rel="stylesheet" href="normalize.css" type="text/css" media="all">
<link rel="stylesheet" href="style.css" type="text/css" media="all">
<!-- <link rel="stylesheet" href="stylesheets/core-css/fonts.css" type="text/css" media="all"> -->
<link rel="import" href="menu.html" type="text/html" name="WYSIWYG">
<link rel="icon" type="image/svg+xml" href="code.svg" sizes="any">
<link rel="icon" type="image/png" href="code-16.png" sizes="16x16">
<script type="application/javascript" src="functions.js"></script>
<script type="application/javascript" src="wysiwyg.js" async=""></script>
</head>
<body>
<div contenteditable="true">
<h1 align="center">HTML5 WYSIWYG Contextmenu Editor For Firefox</h1><h2 align="center"><i><font color="darkgray">See code&nbsp; in <a href="https://gist.github.com/shgysk8zer0/62ae410717617049a094">Gist</a></font></i><br></h2><figure class="fit-content center shadow"><img alt="WYSIWYG Preview" src="wysiwyg_preview.jpg"><br><figcaption>Screen shot of WYSIWYG context menu</figcaption></figure><p>This demo will only be fully functional in Firefox (<i>it should work in other browsers, but the ability to do more than simply enter text requires support of <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu#Examples">contextmenu</a>, which is currently only supported in Firefox</i>).<br></p><h2 align="center">Functionality &amp; Instructions:</h2><hr><ul><li>Click &amp; type, just like in any text editor</li><li>Right-click to reveal <abbr title="What You See Is What You Get">WYSIWYG</abbr> editor menu<br></li><ul><li>Create from a list of available elements</li><ul><li>Headers <code>&lt;h1&gt;</code> – <code>&lt;h6&gt;</code></li><li>Lists (<i>ordered &amp; unordered</i>)</li><li>Images</li><li>Links</li><li>Text style elements (<b>bold</b>, <i>italics</i>, <u>underline</u>, <strike>strike-through</strike>, <sub>subscript</sub>, <sup>superscript</sup>, <mark>highlighted</mark>, <code>code</code>,&nbsp; etc)</li><li>Pre-formatted text<br></li><li><q>Quotes</q> &amp; <br><blockquote>blockquotes<br></blockquote></li></ul><li>Insert raw HTML using <q>Custom HTML</q></li></ul><li>Change font <big><big>size</big></big>, <font color="crimson">color</font>, and <font face="Acme">family</font></li><li>A wide variety of special characters such as:</li><ul><li>Punctuation — <samp>» ¿ †</samp></li><li>Mathematical characters — <samp>± ∫ ≠ ½ ⅝</samp></li><li>Legal &amp; currency characters — <samp>© ™ £ ¥</samp></li><li>A variety of miscellaneous characters — <samp>♣ ♀ ♂ ↑ ♬ ♪</samp></li></ul><li>Horizontal Rules
<hr></li><li>Justify &amp; indent text</li><li>Undo &amp; redo</li><li>Clear formatting &amp; links<br></li></ul>
</div>
</body>
</html>
<menu type="context" id="wysiwyg_menu">
<!--https://developer.mozilla.org/en-US/docs/Midas--><menu label="Attributes">
<menuitem label="Add Class"></menuitem><menuitem label="Remove Class"></menuitem><menuitem label="Set Attribute"></menuitem><menuitem label="Remove Attribute"></menuitem>
</menu>
<menu label="Create">
<menu label="Headings">
<menuitem label="H1" data-editor-command="heading" data-editor-value="H1"></menuitem><menuitem label="H2" data-editor-command="heading" data-editor-value="H2"></menuitem><menuitem label="H3" data-editor-command="heading" data-editor-value="H3"></menuitem><menuitem label="H4" data-editor-command="heading" data-editor-value="H4"></menuitem><menuitem label="H5" data-editor-command="heading" data-editor-value="H5"></menuitem><menuitem label="H6" data-editor-command="heading" data-editor-value="H6"></menuitem>
</menu>
<menu label="List">
<menuitem label="Unordered" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI3NjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTAgNTc2aDEyOHYtMTI4aC0xMjh2MTI4eiBtMC0yNTZoMTI4di0xMjhoLTEyOHYxMjh6IG0wIDUxMmgxMjh2LTEyOGgtMTI4djEyOHogbTI1Ni0yNTZoNTEydi0xMjhoLTUxMnYxMjh6IG0wLTI1Nmg1MTJ2LTEyOGgtNTEydjEyOHogbTAgNTEyaDUxMnYtMTI4aC01MTJ2MTI4eiIgLz4KPC9zdmc+Cg==" data-editor-command="insertunorderedlist"></menuitem><menuitem label="Ordered" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI3NjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTMyMCA1NzZoNDQ4di0xMjhoLTQ0OHYxMjh6IG0wIDI1Nmg0NDh2LTEyOGgtNDQ4djEyOHogbTAtNjQwdjEyOGg0NDh2LTEyOGgtNDQ4eiBtLTI0MSAyNTZoNzh2LTI1NmgtMzZsLTg1IDIzdjUwbDQzLTJ2MTg1eiBtMTEwIDIwNmMwLTM2LTEyLTc4LTk2LTc4LTMzIDAtNjQgNi04MyAxNmwxIDY2YzIxLTEwIDQyLTE1IDY3LTE1czMyIDExIDMyIDI4YzAgMjYtMzAgNTgtMTEwIDExMnY1MGgxOTJ2LTY3bC05MSAyYzQ5LTMwIDg3LTY2IDg3LTExM2wxLTF6IiAvPgo8L3N2Zz4K" data-editor-command="insertorderedlist"></menuitem>
</menu>
<menuitem label="Link" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSIxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxwYXRoIGQ9Ik03NjggMjU2aC0xMzhjNDggMzIgOTMgODkgMTA3IDEyOGgzMGM2NSAwIDEyOCA2NCAxMjggMTI4cy02NSAxMjgtMTI4IDEyOGgtMTkyYy02MyAwLTEyOC02NC0xMjgtMTI4IDAtMjMgNy00NSAxOC02NGgtMTM3Yy01IDIxLTggNDItOCA2NCAwIDEyOCAxMjcgMjU2IDI1NSAyNTZzNjUgMCAxOTMgMCAyNTYtMTI4IDI1Ni0yNTYtMTI4LTI1Ni0yNTYtMjU2eiBtLTQ4MSAzODRoLTMwYy02NSAwLTEyOC02NC0xMjgtMTI4czY1LTEyOCAxMjgtMTI4aDE5MmM2MyAwIDEyOCA2NCAxMjggMTI4IDAgMjMtNyA0NS0xOCA2NGgxMzdjNS0yMSA4LTQyIDgtNjQgMC0xMjgtMTI3LTI1Ni0yNTUtMjU2cy02NSAwLTE5MyAwLTI1NiAxMjgtMjU2IDI1NiAxMjggMjU2IDI1NiAyNTZoMTM4Yy00OC0zMi05My04OS0xMDctMTI4eiIgLz4KPC9zdmc+Cg==" data-editor-command="createlink" data-prompt="Enter link location"></menuitem><menuitem label="Image" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI3NjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTU3NiA2NEgwdjg5Nmg3NjhWMjU2eiBtMTI4IDgzMkg2NFYxMjhoNDgwbDE2MCAxNjB6TTEyOCAyNTZ2NTEyaDEyOGMwLTcxIDU3LTEyOCAxMjgtMTI4LTcxIDAtMTI4LTU3LTEyOC0xMjhzNTctMTI4IDEyOC0xMjggMTI4IDU3IDEyOCAxMjgtNTcgMTI4LTEyOCAxMjhjNzEgMCAxMjggNTcgMTI4IDEyOGgxMjhWMzg0TDUxMiAyNTZ6IiAvPgo8L3N2Zz4K" data-editor-command="insertimage" data-prompt="Enter image location"></menuitem><menuitem label="Figure" data-editor-command="inserthtml" data-selection-to="figure"></menuitem><menuitem label="Figure Caption" data-editor-command="inserthtml" data-selection-to="figcaption"></menuitem><menuitem label="Code" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI4OTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTYwOCAxOTJsLTk2IDk2IDIyNCAyMjRMNTEyIDczNmw5NiA5NiAyODgtMzIwTDYwOCAxOTJ6TTI4OCAxOTJMMCA1MTJsMjg4IDMyMCA5Ni05NkwxNjAgNTEybDIyNC0yMjRMMjg4IDE5MnoiIC8+Cjwvc3ZnPgo=" data-editor-command="inserthtml" data-selection-to="code"></menuitem><menuitem label="Pre-formatted Text" data-editor-command="inserthtml" data-selection-to="pre"></menuitem><menuitem label="Custom HTML" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI3NjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTI4OCAzODRMMTI4IDU0NGwxNjAgMTYwIDY0LTY0LTk2LTk2IDk2LTk2eiBtMTI4IDY0bDk2IDk2LTk2IDk2IDY0IDY0IDE2MC0xNjAtMTYwLTE2MHpNNTc2IDY0SDB2ODk2aDc2OFYyNTZ6IG0xMjggODMySDY0VjEyOGg0ODBsMTYwIDE2MHoiIC8+Cjwvc3ZnPgo=" data-editor-command="inserthtml" data-prompt="Enter the HTML to insert."></menuitem>
</menu>
<menu label="Text Style">
<menu label="Font">
<menu label="Size">
<menuitem label="+" data-editor-command="increasefontsize"></menuitem><menuitem label="-" data-editor-command="decreasefontsize"></menuitem>
</menu>
<menu label="Font Family">
<menuitem label="Acme" data-editor-command="fontname" data-editor-value="Acme"></menuitem><menuitem label="Alice" data-editor-command="fontname" data-editor-value="Alice"></menuitem><menuitem label="Press Start 2P" data-editor-command="fontname" data-editor-value="Press Start 2P"></menuitem><menuitem label="Roboto" data-editor-command="fontname" data-editor-value="Roboto"></menuitem><menuitem label="Ubuntu" data-editor-command="fontname" data-editor-value="Ubutnu"></menuitem>
</menu>
<menu label="Font Color">
<menuitem label="Red" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22red%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="red"></menuitem><menuitem label="Green" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22green%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="green"></menuitem><menuitem label="Blue" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22blue%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="blue"></menuitem><menuitem label="Cyan" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22cyan%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="cyan"></menuitem><menuitem label="Magenta" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22magenta%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="magenta"></menuitem><menuitem label="Yellow" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22yellow%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="yellow"></menuitem><menuitem label="Orange" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22orange%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="orange"></menuitem><menuitem label="Purple" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22purple%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="purple"></menuitem><menuitem label="Pink" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22pink%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="pink"></menuitem><menuitem label="Black" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="black"></menuitem><menuitem label="White" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="white"></menuitem><menuitem label="White Smoke" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22whitesmoke%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="whitesmoke"></menuitem><menuitem label="Azure" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22azure%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="azure"></menuitem><menuitem label="Gray" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22gray%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="gray"></menuitem><menuitem label="Dim Gray" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22dimgray%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="dimgray"></menuitem><menuitem label="Dark Gray" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22darkgray%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="darkgray"></menuitem><menuitem label="Light Gray" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22lightgray%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="lightgray"></menuitem><menuitem label="DarkSlateGray" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22darkslategray%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="darkslategray"></menuitem><menuitem label="Slate Gray" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22slategray%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="slategray"></menuitem><menuitem label="Ivory" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22ivory%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="ivory"></menuitem><menuitem label="Snow" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22snow%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="snow"></menuitem><menuitem label="Lavender" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22lavender%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="lavender"></menuitem><menuitem label="Aqua" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22aqua%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="aqua"></menuitem><menuitem label="Navy" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22navy%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="navy"></menuitem><menuitem label="Lime" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22lime%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="lime"></menuitem><menuitem label="Lime Green" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22limegreen%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="limegreen"></menuitem><menuitem label="Coral" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22coral%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="coral"></menuitem><menuitem label="Crimson" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22crimson%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="crimson"></menuitem><menuitem label="Maroon" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22maroon%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="maroon"></menuitem><menuitem label="Tomato" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22tomato%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="tomato"></menuitem><menuitem label="Fuchsia" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22fuchsia%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="fuchsia"></menuitem><menuitem label="Salmon" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22salmon%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="salmon"></menuitem><menuitem label="Gold" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22gold%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="gold"></menuitem><menuitem label="Green-Yellow" icon="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201%201%22%3E%3Crect%20width%3D%221%22%20height%3D%221%22%20fill%3D%22greenyellow%22%2F%3E%3C%2Fsvg%3E" data-editor-command="forecolor" data-editor-value="greenyellow"></menuitem>
</menu>
</menu>
<menuitem label="Paragraph" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI3NjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTQ0OCAyNTZIMTI4djY0aDMyMHpNNTc2IDY0SDB2ODk2aDc2OFYyNTZ6IG0xMjggODMySDY0VjEyOGg0ODBsMTYwIDE2MHpNMTI4IDc2OGg1MTJ2LTY0SDEyOHogbTAtMTI4aDUxMnYtNjRIMTI4eiBtMC0xMjhoNTEydi02NEgxMjh6IiAvPgo8L3N2Zz4K" data-editor-command="insertparagraph"></menuitem><menuitem label="Blockquote" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI2NDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTAgNTEydjI1NmgyNTZWNTEySDEyOGMwIDAgMC0xMjggMTI4LTEyOFYyNTZDMjU2IDI1NiAwIDI1NiAwIDUxMnpNNjQwIDM4NFYyNTZjMCAwLTI1NiAwLTI1NiAyNTZ2MjU2aDI1NlY1MTJINTEyQzUxMiA1MTIgNTEyIDM4NCA2NDAgMzg0eiIgLz4KPC9zdmc+Cg==" data-editor-command="formatblock" data-editor-value="BLOCKQUOTE"></menuitem><menuitem label="Bold" data-editor-command="bold"></menuitem><menuitem label="Italics" data-editor-command="italic"></menuitem><menuitem label="Underline" data-editor-command="underline"></menuitem><menuitem label="Strike Through" data-editor-command="strikethrough"></menuitem><menuitem label="Big" data-editor-command="big"></menuitem><menuitem label="Small" data-editor-command="small"></menuitem><menuitem label="Superscript" data-editor-command="superscript"></menuitem><menuitem label="Subscript" data-editor-command="subscript"></menuitem><menu label="Other">
<menuitem label="Span/generic" data-editor-command="inserthtml" data-selection-to="span"></menuitem><menuitem label="Strong" data-editor-command="inserthtml" data-selection-to="strong"></menuitem><menuitem label="Emphasis" data-editor-command="inserthtml" data-selection-to="em"></menuitem><menuitem label="Deleted Text" data-editor-command="inserthtml" data-selection-to="del"></menuitem><menuitem label="Inserted Text" data-editor-command="inserthtml" data-selection-to="ins"></menuitem><menuitem label="Sample Text" data-editor-command="inserthtml" data-selection-to="samp"></menuitem><menuitem label="Keyboard" data-editor-command="inserthtml" data-selection-to="kbd"></menuitem><menuitem label="Variable" data-editor-command="inserthtml" data-selection-to="var"></menuitem><menuitem label="Quote" data-editor-command="inserthtml" data-selection-to="q"></menuitem><menuitem label="Citation" data-editor-command="inserthtml" data-selection-to="cite"></menuitem><menuitem label="Highlighted Text" data-editor-command="inserthtml" data-selection-to="mark"></menuitem>
</menu>
</menu>
<menu label="Indentation">
<menuitem label="Increase" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSIxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxwYXRoIGQ9Ik04MzIgMTkydjY0MGgxOTJWMTkySDgzMnpNMzIwIDM4NEgwdjI1NmgzMjB2MTkybDM4NC0zMjBMMzIwIDE5MlYzODR6IiAvPgo8L3N2Zz4K" data-editor-command="indent"></menuitem><menuitem label="Decrease" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSIxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxwYXRoIGQ9Ik0wIDgzMmgxOTJWMTkySDBWODMyek03MDQgMzg0VjE5MkwzMjAgNTEybDM4NCAzMjBWNjQwaDMyMFYzODRINzA0eiIgLz4KPC9zdmc+Cg==" data-editor-command="outdent"></menuitem>
</menu>
<menu label="Justify">
<menuitem label="Center" data-editor-command="justifycenter"></menuitem><menuitem label="Left" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI2NDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTI1Ni4yNSA1MTJMNjQwIDg5NS43NXYtNzY3LjVMMjU2LjI1IDUxMnpNMCA4OTZoMTI4VjEyOEgwVjg5NnoiIC8+Cjwvc3ZnPgo=" data-editor-command="justifyleft"></menuitem><menuitem label="Right" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI2NDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTAgODk1Ljc1TDM4My43NSA1MTIgMCAxMjguMTg4Vjg5NS43NXpNNTEyIDEyOHY3NjhoMTI4VjEyOEg1MTJ6IiAvPgo8L3N2Zz4K" data-editor-command="justifyright"></menuitem><menuitem label="Full" data-editor-command="justifyfull"></menuitem>
</menu>
<menu label="Special Characters">
<menu label="Punctuation">
<menuitem label="&acirc;&#128;&#156;" data-editor-command="inserthtml" data-editor-value="&acirc;&#128;&#156;"></menuitem><menuitem label="&acirc;&#128;&#157;" data-editor-command="inserthtml" data-editor-value="&acirc;&#128;&#157;"></menuitem><menuitem label="&acirc;&#128;&#152;" data-editor-command="inserthtml" data-editor-value="&acirc;&#128;&#152;"></menuitem><menuitem label="&acirc;&#128;&#153;" data-editor-command="inserthtml" data-editor-value="&acirc;&#128;&#153;"></menuitem><menuitem label="&Acirc;&laquo;" data-editor-command="inserthtml" data-editor-value="&Acirc;&laquo;"></menuitem><menuitem label="&Acirc;&raquo;" data-editor-command="inserthtml" data-editor-value="&Acirc;&raquo;"></menuitem><menuitem label="&acirc;&#128;&#154;" data-editor-command="inserthtml" data-editor-value="&acirc;&#128;&#154;"></menuitem><menuitem label="&Acirc;&iquest;" data-editor-command="inserthtml" data-editor-value="&Acirc;&iquest;"></menuitem><menuitem label="&acirc;&#128;&#147;" data-editor-command="inserthtml" data-editor-value="&acirc;&#128;&#147;"></menuitem><menuitem label="&acirc;&#128;&#148;" data-editor-command="inserthtml" data-editor-value="&acirc;&#128;&#148;"></menuitem><menuitem label="&acirc;&#128;&brvbar;" data-editor-command="inserthtml" data-editor-value="&acirc;&#128;&brvbar;"></menuitem><menuitem label="&acirc;&#128;&nbsp;" data-editor-command="inserthtml" data-editor-value="&acirc;&#128;&nbsp;"></menuitem><menuitem label="&acirc;&#128;&iexcl;" data-editor-command="inserthtml" data-editor-value="&acirc;&#128;&iexcl;"></menuitem>
</menu>
<menu label="Legal">
<menuitem label="&Acirc;&copy;" data-editor-command="inserthtml" data-editor-value="&Acirc;&copy;"></menuitem><menuitem label="&acirc;&#132;&cent;" data-editor-command="inserthtml" data-editor-value="&acirc;&#132;&cent;"></menuitem><menuitem label="&Acirc;&reg;" data-editor-command="inserthtml" data-editor-value="&Acirc;&reg;"></menuitem>
</menu>
<menu label="Currency">
<menuitem label="&Acirc;&curren;" data-editor-command="inserthtml" data-editor-value="&Acirc;&curren;"></menuitem><menuitem label="&Acirc;&cent;" data-editor-command="inserthtml" data-editor-value="&Acirc;&cent;"></menuitem><menuitem label="&Acirc;&pound;" data-editor-command="inserthtml" data-editor-value="&Acirc;&pound;"></menuitem><menuitem label="&Acirc;&yen;" data-editor-command="inserthtml" data-editor-value="&Acirc;&yen;"></menuitem><menuitem label="&acirc;&#130;&not;" data-editor-command="inserthtml" data-editor-value="&acirc;&#130;&not;"></menuitem>
</menu>
<menu label="Fractions">
<menuitem label="&Acirc;&frac12;" data-editor-command="inserthtml" data-editor-value="&Acirc;&frac12;"></menuitem><menuitem label="&acirc;&#133;&#147;" data-editor-command="inserthtml" data-editor-value="&acirc;&#133;&#147;"></menuitem><menuitem label="&Acirc;&frac14;" data-editor-command="inserthtml" data-editor-value="&Acirc;&frac14;"></menuitem><menuitem label="&acirc;&#133;&#155;" data-editor-command="inserthtml" data-editor-value="&acirc;&#133;&#155;"></menuitem><menuitem label="&acirc;&#133;&#156;" data-editor-command="inserthtml" data-editor-value="&acirc;&#133;&#156;"></menuitem><menuitem label="&acirc;&#133;&#157;" data-editor-command="inserthtml" data-editor-value="&acirc;&#133;&#157;"></menuitem><menuitem label="&Acirc;&frac34;" data-editor-command="inserthtml" data-editor-value="&Acirc;&frac34;"></menuitem><menuitem label="&acirc;&#133;&#158;" data-editor-command="inserthtml" data-editor-value="&acirc;&#133;&#158;"></menuitem>
</menu>
<menu label="Operators">
<menuitem label="&Acirc;&plusmn;" data-editor-command="inserthtml" data-editor-value="&Acirc;&plusmn;"></menuitem><menuitem label="&Atilde;&#151;" data-editor-command="inserthtml" data-editor-value="&Atilde;&#151;"></menuitem><menuitem label="&acirc;&#136;&#153;" data-editor-command="inserthtml" data-editor-value="&acirc;&#136;&#153;"></menuitem><menuitem label="&Atilde;&middot;" data-editor-command="inserthtml" data-editor-value="&Atilde;&middot;"></menuitem><menuitem label="&acirc;&#136;&#154;" data-editor-command="inserthtml" data-editor-value="&acirc;&#136;&#154;"></menuitem><menuitem label="&acirc;&#137;&nbsp;" data-editor-command="inserthtml" data-editor-value="&acirc;&#137;&nbsp;"></menuitem><menuitem label="&acirc;&#137;&#136;" data-editor-command="inserthtml" data-editor-value="&acirc;&#137;&#136;"></menuitem><menuitem label="&acirc;&#137;&curren;" data-editor-command="inserthtml" data-editor-value="&acirc;&#137;&curren;"></menuitem><menuitem label="&acirc;&#137;&yen;" data-editor-command="inserthtml" data-editor-value="&acirc;&#137;&yen;"></menuitem><menuitem label="&acirc;&#136;&laquo;" data-editor-command="inserthtml" data-editor-value="&acirc;&#136;&laquo;"></menuitem><menuitem label="&acirc;&#136;&#145;" data-editor-command="inserthtml" data-editor-value="&acirc;&#136;&#145;"></menuitem><menuitem label="&acirc;&#136;&#130;" data-editor-command="inserthtml" data-editor-value="&acirc;&#136;&#130;"></menuitem><menuitem label="&acirc;&#136;&#134;" data-editor-command="inserthtml" data-editor-value="&acirc;&#136;&#134;"></menuitem><menuitem label="&AElig;&#146;" data-editor-command="inserthtml" data-editor-value="&AElig;&#146;"></menuitem><menuitem label="&Acirc;&deg;" data-editor-command="inserthtml" data-editor-value="&Acirc;&deg;"></menuitem>
</menu>
<menu label="Other">
<menuitem label="&acirc;&#153;&nbsp;" data-editor-command="inserthtml" data-editor-value="&acirc;&#153;&nbsp;"></menuitem><menuitem label="&acirc;&#153;&pound;" data-editor-command="inserthtml" data-editor-value="&acirc;&#153;&pound;"></menuitem><menuitem label="&acirc;&#153;&brvbar;" data-editor-command="inserthtml" data-editor-value="&acirc;&#153;&brvbar;"></menuitem><menuitem label="&acirc;&#153;&yen;" data-editor-command="inserthtml" data-editor-value="&acirc;&#153;&yen;"></menuitem><menuitem label="&acirc;&#153;&#128;" data-editor-command="inserthtml" data-editor-value="&acirc;&#153;&#128;"></menuitem><menuitem label="&acirc;&#153;&#130;" data-editor-command="inserthtml" data-editor-value="&acirc;&#153;&#130;"></menuitem><menuitem label="&acirc;&#134;&#144;" data-editor-command="inserthtml" data-editor-value="&acirc;&#134;&#144;"></menuitem><menuitem label="&acirc;&#134;&#146;" data-editor-command="inserthtml" data-editor-value="&acirc;&#134;&#146;"></menuitem><menuitem label="&acirc;&#134;&#145;" data-editor-command="inserthtml" data-editor-value="&acirc;&#134;&#145;"></menuitem><menuitem label="&acirc;&#134;&#147;" data-editor-command="inserthtml" data-editor-value="&acirc;&#134;&#147;"></menuitem><menuitem label="&acirc;&#153;&copy;" data-editor-command="inserthtml" data-editor-value="&acirc;&#153;&copy;"></menuitem><menuitem label="&acirc;&#153;&ordf;" data-editor-command="inserthtml" data-editor-value="&acirc;&#153;&ordf;"></menuitem><menuitem label="&acirc;&#153;&not;" data-editor-command="inserthtml" data-editor-value="&acirc;&#153;&not;"></menuitem><menuitem label="&acirc;&#153;&shy;" data-editor-command="inserthtml" data-editor-value="&acirc;&#153;&shy;"></menuitem><menuitem label="&acirc;&#153;&macr;" data-editor-command="inserthtml" data-editor-value="&acirc;&#153;&macr;"></menuitem>
</menu>
</menu>
<menuitem label="Line Break" data-editor-command="inserthtml" data-editor-value="&lt;br&gt;"></menuitem><menuitem label="Horizontal Rule" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI2MzkuODc1IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxwYXRoIGQ9Ik02My45MzggNDQ4aDEyOHYxMjhoNjRWMTkyLjA2MmgtNjRWMzg0aC0xMjhWMTkyLjA2MkgwVjU3Nmg2My45MzhWNDQ4ek02MzkuODc1IDU3NlY0NDhoLTYzLjkzOHYxMjhINjM5Ljg3NXpNNjM5Ljg3NSAzODRWMjU2LjA2MmgtNjMuOTM4VjM4NEg2MzkuODc1ek00NDcuOTM4IDM4NFYyNTYuMDYyaDEyOHYtNjRoLTE5MlY1NzZoNjRWNDQ4aDEyOHYtNjRINDQ3LjkzOHpNMCA4MzJoNjM5Ljg3NVY3MDRIMFY4MzJ6IiAvPgo8L3N2Zz4K" data-editor-command="inserthorizontalrule"></menuitem><menu label="Selection">
<menuitem label="Select All" data-editor-command="selectall"></menuitem><menuitem label="Clear Formatting" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI2NDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTMyMCAxOTJDMTQzLjIxOSAxOTIgMCAzMzUuMjE5IDAgNTEyYzAgMTc2Ljc1IDE0My4yMTkgMzIwIDMyMCAzMjAgMTc2Ljc1IDAgMzIwLTE0My4yNSAzMjAtMzIwQzY0MCAzMzUuMjE5IDQ5Ni43NSAxOTIgMzIwIDE5MnpNMzIwIDMyMGMyNy42NTYgMCA1My42ODggNi4wOTQgNzcuNDM4IDE2LjU2MkwxNDQuNTYyIDU4OS40MzhDMTM0LjA5NCA1NjUuNjg4IDEyOCA1MzkuNjU2IDEyOCA1MTIgMTI4IDQwNiAyMTMuOTM4IDMyMCAzMjAgMzIwek0zMjAgNzA0Yy0yOC4wMzEgMC01NC41MzEtNi4zNzUtNzguNTk0LTE3LjEyNWwyNTMuOTA2LTI1Mi41QzUwNS44NzUgNDU4LjE4OCA1MTIgNDg0LjI4MSA1MTIgNTEyIDUxMiA2MTguMDYyIDQyNi4wNjIgNzA0IDMyMCA3MDR6IiAvPgo8L3N2Zz4K" data-editor-command="removeformat"></menuitem><menuitem label="Remove Links" data-editor-command="unlink"></menuitem>
</menu>
<menu label="History">
<menuitem label="Undo" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI4OTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTQ0OCA2NGMtOTAuOTM4IDAtMTc1LjMxMiAyNy41MzEtMjQ1LjkzOCA3NC4wNjJMMTI4IDY0djI1NmgyNTZsLTg4LTg4YzQ1LjQzOC0yNC42ODggOTYuNjg4LTQwIDE1Mi00MCAxNzYuNzUgMCAzMjAgMTQzLjIxOSAzMjAgMzIwIDAgMTc2Ljc1LTE0My4yNSAzMjAtMzIwIDMyMC0xNzYuNzgxIDAtMzIwLTE0My4yNS0zMjAtMzIwIDAtNDUuNTYyIDkuNzgxLTg4Ljc4MSAyNy0xMjhINjR2LTk5LjQwNkMyNC4zMTIgMzUxLjUgMCA0MjguNTk0IDAgNTEyYzAgMjQ3LjQzOCAyMDAuNTYyIDQ0OCA0NDggNDQ4IDI0Ny40MzggMCA0NDgtMjAwLjU2MiA0NDgtNDQ4Qzg5NiAyNjQuNTYyIDY5NS40MzggNjQgNDQ4IDY0ek00NDcuMDMxIDgzMUw1MTIgNzY4VjU3NmgxMjhsNjQtNjQtNjQtNjRINTEybC02NC02NEwzMjAgNTEybDY0IDY0djE5Mkw0NDcuMDMxIDgzMXoiIC8+Cjwvc3ZnPgo=" data-editor-command="undo"></menuitem><menuitem label="Redo" icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI4OTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTQ0OCA2NGMtOTAuOTM4IDAtMTc1LjMxMiAyNy41MzEtMjQ1LjkzOCA3NC4wNjJMMTI4IDY0djI1NmgyNTZsLTg4LTg4YzQ1LjQzOC0yNC42ODggOTYuNjg4LTQwIDE1Mi00MCAxNzYuNzUgMCAzMjAgMTQzLjIxOSAzMjAgMzIwIDAgMTc2Ljc1LTE0My4yNSAzMjAtMzIwIDMyMC0xNzYuNzgxIDAtMzIwLTE0My4yNS0zMjAtMzIwIDAtNDUuNTYyIDkuNzgxLTg4Ljc4MSAyNy0xMjhINjR2LTk5LjQwNkMyNC4zMTIgMzUxLjUgMCA0MjguNTk0IDAgNTEyYzAgMjQ3LjQzOCAyMDAuNTYyIDQ0OCA0NDggNDQ4IDI0Ny40MzggMCA0NDgtMjAwLjU2MiA0NDgtNDQ4Qzg5NiAyNjQuNTYyIDY5NS40MzggNjQgNDQ4IDY0ek00NDcuMDMxIDgzMUw1MTIgNzY4VjU3NmgxMjhsNjQtNjQtNjQtNjRINTEybC02NC02NEwzMjAgNTEybDY0IDY0djE5Mkw0NDcuMDMxIDgzMXoiIC8+Cjwvc3ZnPgo=" data-editor-command="redo"></menuitem>
</menu>
</menu>
/*! normalize.css v1.1.2 | MIT License | git.io/normalize */
@-moz-viewport{
width:auto;
width:100%;
width:device-width;
height:auto;
height:100%;
height:device-height;
zoom:1;
min-zoom:1;
max-zoom:1;
user-zoom:fixed;
}
@-webkit-viewport{
width:auto;
width:100%;
width:device-width;
height:auto;
height:100%;
height:device-height;
zoom:1;
min-zoom:1;
max-zoom:1;
user-zoom:fixed;
}
@-o-viewport{
width:auto;
width:100%;
width:device-width;
height:auto;
height:100%;
height:device-height;
zoom:1;
min-zoom:1;
max-zoom:1;
user-zoom:fixed;
}
@-ms-viewport{
width:auto;
width:100%;
width:device-width;
height:auto;
height:100%;
height:device-height;
zoom:1;
min-zoom:1;
max-zoom:1;
user-zoom:fixed;
}
@viewport{
width:auto;
width:100%;
width:device-width;
height:auto;
height:100%;
height:device-height;
zoom:1;
min-zoom:1;
max-zoom:1;
user-zoom:fixed;
}
body{
min-height:100%;
min-height:100vh;
}
*, *::after, *::before, *:after, *:before{
margin:0;
padding:0;
box-sizing:border-box;
-webkit-animation-fill-mode:forwards;
animation-fill-mode:forwards;
max-width: 100%;
}
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary,picture{
display:block;
}
audio,canvas,video{
display:inline-block;
*display:inline;
*zoom:1;
}
audio:not([controls]){
display:none;
height:0;
}
[hidden], menu[type=context], datalist{
display:none;
}
html{
-ms-text-size-adjust:100%;
-webkit-text-size-adjust:100%;
}
body{
margin:0;
}
a:focus{
outline:thin dotted;
}
a:active,a:hover{
outline:0;
}
abbr[title]{
border-bottom:1px dotted;
}
b,strong{
font-weight:bold;
}
blockquote{
margin:1em 40px;
}
dfn{
font-style:italic;
}
hr{
-moz-box-sizing:content-box;
box-sizing:content-box;
height:0;
}
mark{
background:#ff0;
color:#000;
}
p,pre{
margin:1em 0;
}
code,kbd,pre,samp{
font-family:monospace,serif;
_font-family:'courier new',monospace;
font-size:1em;
}
pre{
white-space:pre;
white-space:pre-wrap;
word-wrap:break-word;
}
small{
font-size:80%;
}
sub,sup{
font-size:75%;
line-height:0;
position:relative;
vertical-align:baseline;
}
sup{
top:-0.5em;
}
sub{
bottom:-0.25em;
}
dl,ol,ul{
margin:1em 0;
}
dd{
margin:0 0 0 40px;
}
menu,ol,ul{
padding:0 0 0 40px;
}
nav ul,nav ol{
list-style:none;
list-style-image:none;
}
menu[type=list]{
list-style:none;
}
img{
border:0;
-ms-interpolation-mode:bicubic;
}
svg:not(:root){
overflow:hidden;
}
figure{
margin:0;
}
form{
margin:0;
}
fieldset{
border:1px solid silver;
margin:0 2px;
padding:.35em .625em .75em;
}
legend{
border:0;
padding:0;
white-space:normal;
*margin-left:-7px;
}
button,input,select,textarea{
font-size:100%;
margin:0;
vertical-align:baseline;
*vertical-align:middle;
}
button,input{
line-height:normal;
}
button,select{
text-transform:none;
}
button,html input[type="button"],input[type="reset"],input[type="submit"]{
-webkit-appearance:button;
*overflow:visible;
}
button[disabled],html input[disabled]{
cursor:default;
}
input[type="checkbox"],input[type="radio"]{
padding:0;
*height:13px;
*width:13px;
}
input[type="search"]{
-webkit-appearance:textfield;
}
input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{
-webkit-appearance:none;
}
button::-moz-focus-inner,input::-moz-focus-inner{
border:0;
padding:0;
}
dialog:not([open]){
display:none;
}
dialog {
position: absolute;
left: 0px;
right: 0px;
width: -moz-fit-content;
width: -webkit-fit-content;
width: fit-content;
height: -moz-fit-content;
height: -webkit-fit-content;
height: -fit-content;
margin: auto;
border: solid;
border-image-source: initial;
border-image-slice: initial;
border-image-width: initial;
border-image-outset: initial;
border-image-repeat: initial;
padding: 1em;
background: white;
color: black;
}
textarea{
overflow:auto;
vertical-align:top;
}
table{
border-collapse:collapse;
border-spacing:0;
}
@charset 'UTF-8';
@import url(//fonts.googleapis.com/css?family=Acme|Alice|Ubuntu|Roboto|Press+Start+2P|Open+Sans);
@media screen and (min-width:1000px) {
:root{
font-size:1.3vw;
}
}
@media screen and (max-width:999px) and (min-width:500px) {
:root{
font-size:2vw;
}
}
@media screen and (max-width: 499px) {
:root{
font-size:3vw;
}
}
:root {
min-height: 100vh;
}
body {
min-height: 100vh;
font-family: 'Ubuntu';
}
img {
max-width: 100%;
height: auto;
}
figure {
margin-bottom: 2em;
margin-top: 1em;
padding: 1em 3em;
border: 0.1em solid dimgray;
border: 3px outset dimgray;
text-align: center;
}
figure figcaption {
color: dimgray;
text-decoration: underline;
font-style: italic;
}
blockquote {
color: #777;
font-family: 'Libertine';
font-style: italic;
padding: 0px 15px;
border-left: 4px solid #DDD;
}
blockquote cite {
display: block;
}
blockquote cite::before {
content: ' — ';
}
code {
font-size: 0.9rem;
padding: 0.1rem;
background-color: hsl(0, 0%, 93%);
border-radius: 0.2rem;
display: inline-block;
white-space: pre;
}
pre > code {
display: block;
padding: 1rem;
background-color: rgb(51, 51, 51);
color: rgb(255, 249, 217);
border-radius: 0.3rem;
overflow-x: auto;
}
.shadow {
box-shadow: 0.5em 0.5em 1em black;
}
.center {
display: table;
margin-left: auto;
margin-right: auto;
}
.fit-content {
display: inline-block;
}
@supports (width: fit-content) or (width: -moz-fit-content) or (-webkit-fit-content) {
.fit-content {
width: -moz-fit-content;
width: webkit-fit-content;
width: fit-content;
}
.center.fit-content {
display: block;
}
}
function WYSIWYG(menu)
{
menu.querySelectorAll('menuitem[data-editor-command]').forEach(function(item)
{
item.addEventListener('click', function()
{
var arg = null;
if (this.dataset.hasOwnProperty('editorValue')) {
arg = this.dataset.editorValue;
} else if (this.dataset.hasOwnProperty('prompt')) {
arg = prompt(this.dataset.prompt.toString());
} else if (this.dataset.hasOwnProperty('selectionTo')) {
var createdEl = document.createElement(this.dataset.selectionTo);
createdEl.textContent = getSelection().toString();
arg = createdEl.outerHTML;
}
document.execCommand(this.dataset.editorCommand, null, arg);
});
});
menu.querySelectorAll('menuitem[label="Add Class"]').forEach(function(menuitem) {
menuitem.addEventListener('click', function() {
var addClass = prompt('Enter class name to add');
if (addClass.length !== 0) {
getSelection().anchorNode.parentElement.classList.add(addClass);
}
});
});
menu.querySelectorAll('menuitem[label="Remove Class"]').forEach(function(menuitem) {
menuitem.addEventListener('click', function() {
var removeClass = prompt('Enter class name to remove');
if (removeClass.length !== 0) {
var el = getSelection().anchorNode.parentElement;
el.classList.remove(removeClass);
if (el.classList.length === 0) {
el.removeAttribute('class');
}
}
});
});
menu.querySelectorAll('menuitem[label="Set Attribute"]').forEach(function(menuitem) {
menuitem.addEventListener('click', function() {
var name = prompt('Enter attribute name');
if (name.length !== 0) {
var value = prompt('Enter attribute value');
getSelection().anchorNode.parentElement.setAttribute(name, value.toString());
}
})
});
menu.querySelectorAll('menuitem[label="Remove Attribute"]').forEach(function(menuitem) {
menuitem.addEventListener('click', function() {
var attr = prompt('Enter name of attribute to remove');
if (attr.length !== 0) {
getSelection().anchorNode.parentElement.removeAttribute(attr);
}
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment