todo.todoClass#
Type: string
Default: 'todo-list'
CSS class on the exported <ul>.
const app = Redactor('#entry', {
todo: {
todoClass: 'checklist'
}
});
<ul class="checklist">
<li>[ ] Buy milk</li>
</ul>
todo.toggleClass#
Type: false | string
Default: false
CSS class added to a todo <li> when it is checked. false disables this.
const app = Redactor('#entry', {
todo: {
toggleClass: 'is-done'
}
});
<li class="is-done" data-checked="1">…</li>
todo.templateInput#
Type: string
Default: '<input type="checkbox">'
HTML template for the checkbox. Must contain <input type="checkbox">.
const app = Redactor('#entry', {
todo: {
templateInput: '<label class="todo-check"><input type="checkbox"></label>'
}
});
todo.templateContent#
Type: string
Default: '<div></div>'
HTML template for the editable todo text. Redactor adds the todo-text class.
const app = Redactor('#entry', {
todo: {
templateContent: '<div class="todo-label"></div>'
}
});
todo.template#
Type: false | string
Default: false
Full layout template for a todo item. Use $input and $content placeholders.
const app = Redactor('#entry', {
todo: {
template: '<label>$input $content</label>'
}
});