Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/content_editor/extensions/task_list.js')
-rw-r--r--app/assets/javascripts/content_editor/extensions/task_list.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/assets/javascripts/content_editor/extensions/task_list.js b/app/assets/javascripts/content_editor/extensions/task_list.js
index 72c6e020102..01e5bddb97a 100644
--- a/app/assets/javascripts/content_editor/extensions/task_list.js
+++ b/app/assets/javascripts/content_editor/extensions/task_list.js
@@ -4,6 +4,13 @@ import { PARSE_HTML_PRIORITY_HIGHEST } from '../constants';
import { getMarkdownSource } from '../services/markdown_sourcemap';
export default TaskList.extend({
+ addOptions() {
+ return {
+ ...this.parent?.(),
+ HTMLAttributes: { dir: 'auto' },
+ };
+ },
+
addAttributes() {
return {
numeric: {
@@ -33,6 +40,10 @@ export default TaskList.extend({
},
renderHTML({ HTMLAttributes: { numeric, ...HTMLAttributes } }) {
- return [numeric ? 'ol' : 'ul', mergeAttributes(HTMLAttributes, { 'data-type': 'taskList' }), 0];
+ return [
+ numeric ? 'ol' : 'ul',
+ mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': 'taskList' }),
+ 0,
+ ];
},
});