Project:Dynamic Rendering
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

i noticed my page title for Contemplate was titled 'Template for Image Gallery' where em's css default at "font-style:italic" ... my sifr font could not handle italics (some fonts can't do bold/italics) and setting the em in the css to normal doesn't help (just saw this happens on the edit page too for a Dynamic Rendering rule). You need a sifr3-rules.js subrule to target it in flash i believe... plus many other scenarios where you want to create subrules without manually adding them to sifr3-rules.js (since they will get overwritten by the module when saving the rule)...

So here is my patch...
It adds a form field at the end of the module's sifr rule form, which will strip out and parses rules in that textfield. Usually simple, like for me em{ font-style:normal; }...
but it can be many rules like this worked in my testing:
$input = ' em { color:"#FFBE00"; text-decoration: "none"; font-size: 10px; } | i , b#cool, .class #bleh { color:"#FFBE00"; text-decoration: "none"; font-size: 10px; } ';

Each rule looks more like css and is separated by a | character (realized i needed , and ; for the other things, so I choose this).

Patch should work, I also had the 'preventDefault/forceSingleLine' patch in my code but took those out and tested this by itself.

Most of the code is just to make the css rule look nice in the .js file by stripping out whitespace (someone can make this more efficient probably), for example above example in the js file looks like:
.... , "em": { "color": "#FFBE00", "text-decoration": "none", "font-size": "10px" }, "i, b#cool, .class #bleh": { "color": "#FFBE00", "text-decoration": "none", "font-size": "10px" }

AttachmentSize
sifr3_2.patch3.09 KB

Comments

#1

Crap lol. forgot drupal.org even though uses a plain text looking textarea, that it outputs html. Doh. Wish drupal.org used simple version of FCKeditor so user can toggle between richtext/plaintext. Truly sorry for above post spacing/html!

nobody click here