开发者

Customize Tinymce to setstyle to the numbers in the numbered ordered list

I am using TinyMce editor in my rails application.

I am trying to customize the plugin . In TinyMce editor the Font size will not set for the numbers for a numbered ordered list.

So i am trying to change that feature so that when i have a numbered ordered list and when i change the font /font size it will apply to the numbers too .

In the javascripts/tiny_mce/tiny_mce_src.js file开发者_运维知识库 of public folder.

      t.setAttrib(e, '_mce_style');} 

 is the place where the style has been set inside the function

         setStyle : function(n, na, v) { }

When i put t.setAttrib(this.getParent(e), '_mce_style');}

the above doesn't apply the style to the li

the structure is like

  1. 1. abc
  2. 2. def
  3. 3. ghi

How to resolve this ...

Please give suggestions..

In some cases there are lot pf spans inside the same li


Why don't you write some code that is able to identify ordered lists in the code and modify the editor content in a way that the style is changed? For this you could "hook" a function to the creation of the ordered list (if you want i can show you how). This function then would do what you want.

Another option is to apply the desired style to the li using a custom css set by the init parameter content_css. This css will be applied to the already defined set of css and can be used to overwrite style settings.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜