Enable task list items for Common Mark text formatting (#35742).

git-svn-id: http://svn.redmine.org/redmine/trunk@21383 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2022-01-22 09:24:43 +00:00
parent 8c147ca2b1
commit 380a3b0345
7 changed files with 48 additions and 0 deletions

View File

@@ -132,6 +132,20 @@ jsToolBar.prototype.elements.ol = {
}
}
// tl
jsToolBar.prototype.elements.tl = {
type: 'button',
title: 'Task list',
fn: {
wiki: function() {
this.encloseLineSelection('','',function(str) {
str = str.replace(/\r/g,'');
return str.replace(/(\n|^)[*-]?\s*/g,"$1* [ ] ");
});
}
}
}
// spacer
jsToolBar.prototype.elements.space3 = {type: 'space'}