<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>New post</title> <script src="wysihtml5/parser_rules/advanced.js" ></script> <script src="wysihtml5/wysihtml5-0.3.0.js" ></script> <link rel="stylesheet" href="wysihtml5/reset-min.css"> <link rel="stylesheet" href="wysihtml5/wysihtml5-stylesheet.css"> <link rel="stylesheet" href="newpost.css"> </head> <body> <div class='banner'><img src="banner.png" /></div> <div id="wysihtml5-editor-toolbar"> <header> <ul class="commands"> <li data-wysihtml5-command="bold" title="Make text bold (CTRL + B)" class="command"></li> <li data-wysihtml5-command="italic" title="Make text italic (CTRL + I)" class="command"></li> <li data-wysihtml5-command="insertUnorderedList" title="Insert an unordered list" class="command"></li> <li data-wysihtml5-command="insertOrderedList" title="Insert an ordered list" class="command"></li> <li data-wysihtml5-command="createLink" title="Insert a link" class="command"></li> <li data-wysihtml5-command="insertImage" title="Insert an image" class="command"></li> <li data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h1" title="Insert headline 1" class="command"></li> <li data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h2" title="Insert headline 2" class="command"></li> <li data-wysihtml5-command-group="foreColor" class="fore-color" title="Color the selected text" class="command"> <ul> <li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="silver"></li> <li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="gray"></li> <li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="maroon"></li> <li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="red"></li> <li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="purple"></li> <li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="green"></li> <li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="olive"></li> <li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="navy"></li> <li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="blue"></li> </ul> </li> <li data-wysihtml5-action="change_view" title="Show HTML" class="action"></li> </ul> </header> <div data-wysihtml5-dialog="createLink" style="display: none;"> <label> Link: <input data-wysihtml5-dialog-field="href" value="http://"> </label> <a data-wysihtml5-dialog-action="save">OK</a> <a data-wysihtml5-dialog-action="cancel">Cancel</a> </div> <div data-wysihtml5-dialog="insertImage" style="display: none;"> <label> Image: <input data-wysihtml5-dialog-field="src" value="http://"> </label> <a data-wysihtml5-dialog-action="save">OK</a> <a data-wysihtml5-dialog-action="cancel">Cancel</a> </div> </div> <section class="editorsection"> <textarea id="wysihtml5-editor" spellcheck="false" wrap="off" autofocus placeholder="Escribe aquí ..."> </textarea> </section> <div class='buttondiv'> <span class='buttonspan'><input class='rounded' id='donewpost' type ='button' value='Enviar'/></span> </div> <div class='titlediv'> <p><input id="title" class="roundedtext" placeholder="Título"/></p> </div> <script> var editor = new wysihtml5.Editor("wysihtml5-editor", { toolbar: "wysihtml5-editor-toolbar", stylesheets: ["wysihtml5/reset-min.css", "wysihtml5/wysihtml5-editor.css"], parserRules: wysihtml5ParserRules }); editor.on("load", function() { var composer = editor.composer, h1 = editor.composer.element.querySelector("h1"); if (h1) { composer.selection.selectNode(h1); } }); </script> <script src='newpost.js'></script> </body> </html>