This plugin adds a fancypost BBCode tag which will allow your users to safely style a section of their post using select CSS attributes.
Aside from limiting which CSS attributes the user can use (to prevent them from doing something naughty such as covering the entire page), the values given for the CSS attributes are escaped to avoid injection of nefarious content.
As an example, the tag
Code
[fancypost=border-radius: 6px; border-color: green; background-color: blue; color: #FFFFFF; width: 5000px;][color=white]This is some text[/color][/fancypost]
would create
(notice the border color is correctly missing since no border-size was given, and the tag isn't allowed to take up the 5000 pixel width requested by the user)
The allowed CSS attributes are:
- background-color
- background-image
- background-position
- background-repeat
- background-clip
- background-size
- border-bottom
- border-bottom-color
- border-bottom-left-radius
- border-bottom-right-radius
- border-bottom-style
- border-bottom-width
- border-color
- border-image
- border-left
- border-left-color
- border-left-style
- border-left-width
- border-radius
- border-right
- border-right-color
- border-right-style
- border-right-width
- border-style
- border-top
- border-top-color
- border-top-left-radius
- border-top-right-radius
- border-top-style
- border-top-width
- border-width
- box-shadow
- bottom
- color
- height
- left
- margin-bottom
- margin-left
- margin-right
- margin-top
- min-height
- min-width
- max-height
- max-width
- overflow
- overflow-x
- overflow-y
- padding-bottom
- padding-left
- padding-right
- padding-top
- width
- vertical-align
- line-height
- text-align
- word-wrap
-
Version 1.0.2
- DynamoGeek
- 2.17 kB
- 68 Downloads
Updated code to remove unnecessary HTML escaping.
jens1o
Will this plugin be published to version Woltlab Suite 3.0?
DynamoGeek Author
It's been updated to work with 3.0 but I haven't gone through the process to get it approved for WSC 3.0 on Woltlab due to the lower usage of it.
If you'd like, you can get it from my package server at http://wcfpackages.dynamogeek.com/. You can add it in your ACP, or just download the relevant package from the web interface (by going to http://wcfpackages.dynamogeek.com/).
jens1o
Perfect, thanks!