513 Posts in 209 Topics by 259 members
Page: 1 2
|Go to End||Next >|
2 July 2009 at 5:30pm Last edited: 2 July 2009 6:06pm
Silverstripe drops out css styling for span......... i just upadated my silverstripe to version 2.3.2 ......... in earlier version it ws working properly........... all styling which i had given to spans through content editor is gone now......... it happens when i re-edit the content with new version of silverstripe......
in many places i had given styling for spans....... if editor drops out my styling, then i wont be able to re-edit my contents.......
2 July 2009 at 6:17pm
Yes I have realized the same. In ver 2.3.2 inline Styling has been disabled for SPAN where as it still works for DIV .
<span style="color:#fff" > Hello World </span>
^^ Styling is removed from Tinymce when I click on insert.
If this was intentionally done please requesting to disable it or a way out.
Otherwise we end up using too many classes.
2 July 2009 at 6:34pm
This is done by TinyMCE, not Siverstripe per se. Tiny was upgraded for SS 2.3.x, and with it a new set of default rules.
Check out CMS/code/LeftAndMain.php, around line 175 ('valid_elements'). This sets the tags and corresponding attributes that TinyMCE will allow in the content editor. You should be able to add style to the span tag and enable it.
For more information check out the TinyMCE wiki here --> http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/valid_elements
Please keep in mind that style tags aren't great form and classes should be used to style elements where ever possible.
2 July 2009 at 6:58pm
24 July 2009 at 9:03pm
Thanks heaps for the info provided (DesignCity), I found it very useful.
My single greatest gripe about Silverstripe is the ability to work with raw HTML. I wish all the information regarding this was easier to find. I'm not a programmer type, more of a designer, but I want to easily be able to add html for things like swfobject (to make flash validate) etc.
In one method I tried editing line 158 (cms/code/LeftAndMain.php) to replace with:
- I might not have done this correctly, but it worked in that I could use completely raw html... But then in the cms it wouldn't save and publish my pages properly (it would hang and I would have to flush constantly to open different pages etc). I currently use iframes to include my flash content, and I'm sure there must be a better way out there... (I'm using Silverstripe 2.3.2)
24 July 2009 at 9:17pm Last edited: 24 July 2009 9:19pm
Please keep in mind that Silverstripe uses TinyMCE - everything to do with what happens in that content box is basically Tiny. You'd probably do well to search/post on the Tiny forums for answers to specific questions like that.
Having said that, I think the link I provided in this post (http://www.silverstripe.org/content-editor-discussions/show/263801?start=0#post263804) has the answer:
Use *[ * ] to include all elements and all attributes. This can be very useful when used with the invalid_elements option.
(I added the spaces inside the square brackets because otherwise the forums thinks it's BBcode - don't include the spaces in your LeftAndMain.php!)
Replace everything in the valid elements array with just this - *[ * ]
Haven't tested it myself, but it should work just fine
2 August 2009 at 3:19am Last edited: 2 August 2009 3:22am
I just noticed and fixed this in a site I am working on, then found this thread. It seems like a rediculous decision to have removed the style attribute as it means that half the buttons on the top row of the toolbar now don't work, for example the text alignement on paragraphs wont work, nor will underline or italic. If the idea is to encourage using classes then remove the buttons that no longer work, rather than confusing people.
Anyway rant over, I just stuck this (very long) line in my Page.php getCMSFields() function to fix it (no need to edit LeftAndMain.php):
2 August 2009 at 10:32am
Hi DesignCity & Aram,
As a SS novice I just wanted to thank you both for the input, I really appreciate it. Aram, curiously I've never used the buttons you mentioned (I always use the html editor), however I probably should use the buttons, so it is good to know about the problem, and thanks for the alternative.
If you have any specific advise, or know of any methods regarding embedding Flash using SWFObject, please keep me posted. Otherwise I'm assuming the options you have both provided may allow for this? - I will most likely post again here if I have any trouble.
Page: 1 2
|Go to Top||Next >|