aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-04-05 14:46:16 -0400
committerAndrew Manning <tamanning@zoho.com>2016-04-05 14:46:16 -0400
commit1eb6067c31f10c8da262fd8aef8d740b94d85137 (patch)
treedb7c2eab4075b64c1a39d834a6488ff4f42bf4be /view/js
parentbd29551f9aec4c463c02a3c57a5d6d94c9ee318d (diff)
downloadvolse-hubzilla-1eb6067c31f10c8da262fd8aef8d740b94d85137.tar.gz
volse-hubzilla-1eb6067c31f10c8da262fd8aef8d740b94d85137.tar.bz2
volse-hubzilla-1eb6067c31f10c8da262fd8aef8d740b94d85137.zip
Improve (un)ordered list autocompletion for list construction
Diffstat (limited to 'view/js')
-rw-r--r--view/js/autocomplete.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index b4879d464..3e7e08b35 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -202,7 +202,7 @@ function submit_form(e) {
$.fn.bbco_autocomplete = function(type) {
if(type=='bbcode') {
- var open_close_elements = ['b', 'i', 'u', 's', 'quote', 'code', 'spoiler', 'map', 'nobb', 'list', 'ul', 'ol', 'table', 'tr', 'th', 'td', 'center', 'color', 'font', 'size', 'zrl', 'zmg', 'rpost', 'qr', 'observer'];
+ var open_close_elements = ['b', 'i', 'u', 's', 'quote', 'code', 'spoiler', 'map', 'nobb', 'li', 'list', 'ul', 'ol', 'table', 'tr', 'th', 'td', 'center', 'color', 'font', 'size', 'zrl', 'zmg', 'rpost', 'qr', 'observer'];
var open_elements = ['observer.baseurl', 'observer.address', 'observer.photo', 'observer.name', 'observer.webname', 'observer.url', '*', 'hr', ];
var elements = open_close_elements.concat(open_elements);
@@ -225,7 +225,11 @@ function submit_form(e) {
index: 1,
replace: function (element) {
if(open_elements.indexOf(element) < 0) {
+ if(element === 'ol' || element === 'ul') {
+ return ['\[' + element + '\]' + '\n\[li\]', '\[/li\]\n' + '\[/' + element + '\]'];
+ } else {
return ['\[' + element + '\]', '\[/' + element + '\]'];
+ }
}
else {
return '\[' + element + '\] ';