diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-08-31 09:38:47 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-08-31 09:38:47 +0200 |
commit | 2b9322fc7d879fecbe334083bbd028538c985c54 (patch) | |
tree | 278a9b59dc44f60d5ad30db2fae39f76d14e426f /include/bbcode.php | |
parent | 202b757bc46d17b324f79751ce754e16ba737386 (diff) | |
download | volse-hubzilla-2b9322fc7d879fecbe334083bbd028538c985c54.tar.gz volse-hubzilla-2b9322fc7d879fecbe334083bbd028538c985c54.tar.bz2 volse-hubzilla-2b9322fc7d879fecbe334083bbd028538c985c54.zip |
provide a possibility to create checklists in bbcode [x] creates a checked checkbox, [] creates an unchecked checkbox
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index db3a1011b..2d86bd263 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -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; |