#31 new
Diego Kuperman

Setting for style_formats is broken

Reported by Diego Kuperman | March 29th, 2011 @ 01:37 AM

Hello,

I'm trying to configure style_formats from the config/tiny_mce.yml following the tinymce documentation(http://tinymce.moxiecode.com/wiki.php/Configuration:style_formats). It states it should be an array of hashes, I've used an script to be sure the yaml conversion is ok, this is an example yaml I'm using:

  style_formats:
    - inline: b
      title: Bold text
    - inline: span
      styles:
        color: '#ff0000'
      title: Red text
    - inline: span
      styles:
        color: green
      title: Green text

When it get converted to json on the plugin config, it becomes:

{
  //...
  style_formats : "titleBold textinlineb,titleRed textinlinespanstylescolor#ff0000,titleGreen textinlinespanstylescolorgreen",
  //...
}

Here I've found the code that's doing this:

https://github.com/kete/tiny_mce/blob/master/lib/tiny_mce/configura...

... I don't really understand why not to allow deeper json serialization, this 'joining' sentence broke this I've explained and I guess it will also break another possible configs.

Is there another way to do what I want and I'm getting all this wrong or is this a real bug?

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

A Ruby on Rails plugin that allows easy implementation of the TinyMCE editor into your applications.

People watching this ticket

Pages