diff options
author | redmatrix <git@macgirvin.com> | 2016-04-05 16:44:11 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-04-05 16:44:11 -0700 |
commit | 6f6051f7e376e6b9194f8444de074bd21c60c8eb (patch) | |
tree | fd96901ae7f4ec9306fc730fed945e786dbc4e3b /view/js | |
parent | f9778fda83e4d9a3e8bf0fb5325bab66be105154 (diff) | |
parent | ea3fb53e4b7b93dfb353448b8ed59f792ec5544f (diff) | |
download | volse-hubzilla-6f6051f7e376e6b9194f8444de074bd21c60c8eb.tar.gz volse-hubzilla-6f6051f7e376e6b9194f8444de074bd21c60c8eb.tar.bz2 volse-hubzilla-6f6051f7e376e6b9194f8444de074bd21c60c8eb.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/autocomplete.js | 6 |
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 + '\] '; |