diff options
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/markdown/header.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/markdown/header.vue | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/assets/javascripts/vue_shared/components/markdown/header.vue b/app/assets/javascripts/vue_shared/components/markdown/header.vue index 01cf0beea3a..d343ba700ab 100644 --- a/app/assets/javascripts/vue_shared/components/markdown/header.vue +++ b/app/assets/javascripts/vue_shared/components/markdown/header.vue @@ -63,6 +63,9 @@ export default { '\n', ); }, + mdCollapsibleSection() { + return ['<details><summary>Click to expand</summary>', `{text}`, '</details>'].join('\n'); + }, isMac() { // Accessing properties using ?. to allow tests to use // this component without setting up window.gl.client. @@ -245,6 +248,13 @@ export default { icon="list-task" /> <toolbar-button + :tag="mdCollapsibleSection" + :prepend="true" + tag-select="Click to expand" + :button-title="__('Add a collapsible section')" + icon="details-block" + /> + <toolbar-button :tag="mdTable" :prepend="true" :button-title="__('Add a table')" |