From 6aa617e41ec808e537eb3bd336433bec36d99e0c Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 21 Feb 2019 11:41:08 +0100 Subject: [PATCH] Add TOC button to the markdown toolbar --- www/common/common-ui-elements.js | 4 ++++ www/common/translations/messages.json | 1 + 2 files changed, 5 insertions(+) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index c9b92b586..863b99bb3 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -997,6 +997,10 @@ define([ return '`' + str + '`'; }, icon: 'fa-code' + }, + 'toc': { + expr: '[TOC]', + icon: 'fa-newspaper-o' } }; var onClick = function () { diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index 0b0edb28c..7fec488e9 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -599,6 +599,7 @@ "mdToolbar_list": "Bullet list", "mdToolbar_check": "Task list", "mdToolbar_code": "Code", + "mdToolbar_toc": "Table of Contents", "home_product": "CryptPad is a private-by-design alternative to popular office tools and cloud services. All the content stored on CryptPad is encrypted before being sent, which means nobody can access your data unless you give them the keys (not even us).", "home_host": "This is an independent community instance of CryptPad. Its source code is available on GitHub.", "home_host_agpl": "CryptPad is distributed under the terms of the AGPL3 software license",