bbcode: two new bbcode elements (style, class) for CSS
This commit is contained in:
parent
dc416e5887
commit
bed99674d2
|
@ -224,6 +224,12 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
|
||||||
// Check for list text
|
// Check for list text
|
||||||
$Text = str_replace("[*]", "<li>", $Text);
|
$Text = str_replace("[*]", "<li>", $Text);
|
||||||
|
|
||||||
|
// Check for style sheet commands
|
||||||
|
$Text = preg_replace("(\[style=(.*?)\](.*?)\[\/style\])ism","<span style=\"$1;\">$2</span>",$Text);
|
||||||
|
|
||||||
|
// Check for CSS classes
|
||||||
|
$Text = preg_replace("(\[class=(.*?)\](.*?)\[\/class\])ism","<span class=\"$1\">$2</span>",$Text);
|
||||||
|
|
||||||
// handle nested lists
|
// handle nested lists
|
||||||
$endlessloop = 0;
|
$endlessloop = 0;
|
||||||
|
|
||||||
|
|
|
@ -2550,3 +2550,8 @@ list-style-type: disc;
|
||||||
float: left;
|
float: left;
|
||||||
width: 175px;
|
width: 175px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item-image-preview {
|
||||||
|
float: left;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue