aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-08-31 09:38:47 +0200
committerMario Vavti <mario@mariovavti.com>2016-08-31 09:38:47 +0200
commit2b9322fc7d879fecbe334083bbd028538c985c54 (patch)
tree278a9b59dc44f60d5ad30db2fae39f76d14e426f
parent202b757bc46d17b324f79751ce754e16ba737386 (diff)
downloadvolse-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
-rw-r--r--include/bbcode.php2
-rw-r--r--view/css/conversation.css5
2 files changed, 7 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;
diff --git a/view/css/conversation.css b/view/css/conversation.css
index 6c5171545..fe89e2536 100644
--- a/view/css/conversation.css
+++ b/view/css/conversation.css
@@ -319,3 +319,8 @@ img.smiley.emoji:hover {
width: 32px;
height: 32px;
}
+
+input.listcheckbox {
+ margin: 0px;
+ vertical-align: middle;
+}