provide a possibility to create checklists in bbcode [x] creates a checked checkbox, [] creates an unchecked checkbox
This commit is contained in:
parent
202b757bc4
commit
2b9322fc7d
@ -769,6 +769,8 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
|
||||
}
|
||||
// Check for list text
|
||||
$Text = str_replace("[*]", "<li>", $Text);
|
||||
$Text = str_replace("[]", "<li><input class=\"listcheckbox\" type=\"checkbox\" disabled=\"disabled\">", $Text);
|
||||
$Text = str_replace("[x]", "<li><input class=\"listcheckbox\" type=\"checkbox\" checked=\"checked\" disabled=\"disabled\">", $Text);
|
||||
|
||||
// handle nested lists
|
||||
$endlessloop = 0;
|
||||
|
@ -319,3 +319,8 @@ img.smiley.emoji:hover {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
input.listcheckbox {
|
||||
margin: 0px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
Reference in New Issue
Block a user