Hi Monks,
After the controversy of my last post, I thought I'd post this in a spirit of reconciliation. I've also switched my spell-check back to English which might help.
Here is a piece of JavaScript that displays a toolbar with some html generator buttons on the text area where we type our responses. You put it in your Free Nodelet and it loads up a small editor.
The JavaScript source code can be downloaded freely to perlmonks.org from here (www.tinymce.com), so that the risk of code changes would be lessened. Then of course it need not be included in our free nodelet.
Update 1 for tables, menu and other cool stuff.
Update 2 There seem to be some integration problems between tinyMCE and PM. TinyMCE posts as a wholeblock. I'm looking into it. - OK now.
Update 3. Needs some experimentation to get used to.
Update 4. White space and formatting issues fixed (Thanks anon).
<script src="//tinymce.cachefly.net/4.1/tinymce.min.js"></script> <script type="text/javascript">// <![CDATA[ tinymce.init({ selector: 'textarea', remove_linebreaks: false, forced_root_block : 'p', convert_newlines_to_brs : true, preformatted : true, plugins: 'table wordcount searchreplace autosave spellchecker visualb +locks textpattern textcolor save print preview paste lists link inser +tdatetime hr fullscreen legacyoutput contextmenu code charmap', // m +edia image tabfocus pagebreak template fullpage bbcode colorpicker em +oticons toolbar: 'undo redo | table | bold italic | alignleft aligncenter alig ++nright alignjustify | bullist numlist outdent indent | link | print +preview | forecolor backcolor emoticons charmap code | hr paste searc +hreplace spellchecker template visualblocks insertdatetime', // inser +tfile styleselect save media image fullpage pagebreak statusbar : true }); // ]]></script>
Try it out and let me know what you think.
Regards
Steve

In reply to TinyMCE javascript toolbar by Steve_BZ

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.