Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: TinyMCE javascript toolbar

by Steve_BZ (Chaplain)
on Dec 14, 2014 at 11:10 UTC ( #1110304=note: print w/replies, xml ) Need Help??

in reply to TinyMCE javascript toolbar

Hi Monks,
So this post was posted with TinyMCE. Here are some features, all from the toolbar:
  1. Some lists without all that ol and ul li stuff,
  2. Second item
Now some unordered items:
  • Text 1 (Some with Bold and some with Italics
  • Text 2 (Strikethrough)
Special characters like ‰ (what is that?)


And lots of other stuff.
It still has a few issues, but they mostly have workarounds which are easer than scripting the HTML yourself. Here are a few:

It suppresses white space.  (Updated OK, white space issue fixed).

p-tags and br-tags are converted to non-breakable space characters. This is not very helpful, so this post has a table for paragraphs. Oh, I forgot it has tables too:
row header
row item
row item

It has a spellcheck but I haven't got it working yet

I haven't quite got the hang of code snips yet. There is a code-tag and a pre-tag. Here they are:

Code tag

use strict;

use warnings;

print @_;

(Note white space problem -now fixed again thanks to "Anon"- and (updated) paired code tags on each line - thanks anon)

Here is a pre-tag

use strict;
use warnings;
print @_;

Updated: unsuported style= attributes in tables and lists.

(Thanks Tye)
I'll keep on plugging and update as I find resolutions.

Replies are listed 'Best First'.
Re^2: TinyMCE javascript toolbar (style=)
by tye (Sage) on Dec 14, 2014 at 16:57 UTC

    It is also posting unapproved attributes (seems just "style=...") that show up as error indications if you have error reporting turned up.

    - tye        

      Hi Tye
      Thanks for noticing that, I hadn't. I did wonder why the colours I had specified did not come out :)
      I'll check the tinyMCE user manual. I thought you could specify allowed tags, but I don't recall seeing attributes.


        Speaking of and Perl Monks Approved HTML tags
        valid_elements : "a[href|name|target|class|title|rel],abbr[title],b,bi +g,blockquote[class|cite|lang|dir],br,c,caption[class],center,code,col +[align|col|span|width|class],colgroup[align|col|span|width|class],dd, +del[class|datetime|cite],div[class],dl,dt,em,font[size|color|class],h +[class|align],h3[class|align],h4[class|align],h5[class|align],h6[clas +s|align],hr,i,ins[class|datetime|cite],li[value],ol[type|start],p[ali +gn|class],pre[class],readmore3[title],small,span[class|title],spoiler +4,strike,strong,sub,sup,table[width|cellpadding|cellspacing|border|bg +color|class],tbody[width|align|valign|colspan|rowspan|bgcolor|height| +class],td[width|align|valign|colspan|rowspan|bgcolor|height|class],tf +oot[width|align|valign|colspan|rowspan|bgcolor|height|class],th[width +|align|valign|colspan|rowspan|bgcolor|height|class],thead[width|align +|valign|colspan|rowspan|bgcolor|height|class],tr[width|align|valign|c +olspan|bgcolor|height|class],tt[class],u,ul[type],wbr"
Re^2: TinyMCE javascript toolbar
by Anonymous Monk on Dec 14, 2014 at 11:49 UTC
    This is not good :)
    <h2>Code tag</h2> <code>use strict;</code> <code>use warnings;</code> <code>print @_;</code>
      Yes, I saw that. Any ideas?

        Yes, I saw that. Any ideas?

        I don't hack TinyMCE :)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1110304]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2023-02-05 15:09 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (32 votes). Check out past polls.