Jump to:

5514 Posts in 1733 Topics by 1219 members

Customising the CMS

SilverStripe Forums » Customising the CMS » tinymce : link + forecolor

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1823 Views
  • erwanpia
    Community Member
    63 Posts

    tinymce : link + forecolor Link to this post

    as usual, bugs in silverstripe are not bugs but features : I was wondering why the forecolor button I added in tiny mce ( line 183 in LeftAndMain.php) was not effectively adding the style color attribute to the zone I had selected

    well simpler as ever, LeftAdMain occurs to actually configure authorized tags and attributes for tinymce, and at line 175 the style attribute was not authorized for the span element, which is how the forecolor button in tinymce applies the color, just added the style to span and there we go.

    'valid_elements' => "+a[id|rel|rev|dir|tabindex|accesskey|type|name|href|target|title|class],-strong/-b[class],-em/-i[class],-strike[class],-u[class],#p[id|dir|class|align],-ol[class],-ul[class],-li[class],br,img[id|dir|longdesc|usemap|class|src|border|alt=|title|width|height|align],-sub[class],-sup[class],-blockquote[dir|class],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|dir|id|style],-tr[id|dir|class|rowspan|width|height|align|valign|bgcolor|background|bordercolor|style],tbody[id|class|style],thead[id|class|style],tfoot[id|class|style],-td[id|dir|class|colspan|rowspan|width|height|align|valign|scope|style],-th[id|dir|class|colspan|rowspan|width|height|align|valign|scope|style],caption[id|dir|class],-div[id|dir|class|align|style],-span[class|align|style],-pre[class|align],address[class|align],-h1[id|dir|class|align],-h2[id|dir|class|align],-h3[id|dir|class|align],-h4[id|dir|class|align],-h5[id|dir|class|align],-h6[id|dir|class|align],hr[class],dd[id|class|title|dir],dl[id|class|title|dir],dt[id|class|title|dir]",

    another great modif I gave to my customer was reverting to the tinymce standard link feature, silverstripe is well thought but badly implemented (messes with the typed string, especially when worjking with links over images and texts)


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.