Skip to content

Commit 8cdc30c

Browse files
committed
added feature MARTOR_TOOLBAR_BUTTONS
1 parent e07ef33 commit 8cdc30c

File tree

12 files changed

+185
-115
lines changed

12 files changed

+185
-115
lines changed

README.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,15 @@ to get ``IMGUR_CLIENT_ID`` and ``IMGUR_API_KEY``.
122122
'hljs': 'true', # to enable/disable hljs highlighting in preview
123123
}
124124

125-
# To setup the martor editor with label or not (default is False)
125+
# To show the toolbar buttons
126+
MARTOR_TOOLBAR_BUTTONS = [
127+
'bold', 'italic', 'horizontal', 'heading', 'pre-code',
128+
'blockquote', 'unordered-list', 'ordered-list',
129+
'link', 'image-link', 'image-upload', 'emoji',
130+
'direct-mention', 'toggle-maximize', 'help'
131+
]
132+
133+
# To setup the martor editor with title label or not (default is False)
126134
MARTOR_ENABLE_LABEL = False
127135

128136
# Imgur API Keys

martor/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
22

3-
__VERSION__ = '1.4.9'
3+
__VERSION__ = '1.5.0'
44
__AUTHOR__ = 'Agus Makmun (Summon Agus)'
55
__AUTHOR_EMAIL__ = 'summon.agus@gmail.com'

martor/locale/en/LC_MESSAGES/django.po

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2020-01-21 10:54+0700\n"
11+
"POT-Creation-Date: 2020-07-16 11:05+0700\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -52,7 +52,7 @@ msgid ""
5252
"\"%(doc_url)s\" target=\"_blank\">click here</a>."
5353
msgstr ""
5454

55-
#: templates/martor/guide.html:10 templates/martor/toolbar.html:26
55+
#: templates/martor/guide.html:10 templates/martor/toolbar.html:38
5656
msgid "Code"
5757
msgstr ""
5858

@@ -64,68 +64,68 @@ msgstr ""
6464
msgid "... to Get"
6565
msgstr ""
6666

67-
#: templates/martor/toolbar.html:4
67+
#: templates/martor/toolbar.html:5
6868
msgid "Bold"
6969
msgstr ""
7070

71-
#: templates/martor/toolbar.html:7
71+
#: templates/martor/toolbar.html:11
7272
msgid "Italic"
7373
msgstr ""
7474

75-
#: templates/martor/toolbar.html:10
75+
#: templates/martor/toolbar.html:17
7676
msgid "Horizontal Line"
7777
msgstr ""
7878

79-
#: templates/martor/toolbar.html:13 templates/martor/toolbar.html:16
80-
#: templates/martor/toolbar.html:17 templates/martor/toolbar.html:18
79+
#: templates/martor/toolbar.html:23 templates/martor/toolbar.html:26
80+
#: templates/martor/toolbar.html:27 templates/martor/toolbar.html:28
8181
msgid "Heading"
8282
msgstr ""
8383

84-
#: templates/martor/toolbar.html:22
84+
#: templates/martor/toolbar.html:34
8585
msgid "Pre or Code"
8686
msgstr ""
8787

88-
#: templates/martor/toolbar.html:25
88+
#: templates/martor/toolbar.html:37
8989
msgid "Pre"
9090
msgstr ""
9191

92-
#: templates/martor/toolbar.html:29
92+
#: templates/martor/toolbar.html:44
9393
msgid "Quote"
9494
msgstr ""
9595

96-
#: templates/martor/toolbar.html:32
96+
#: templates/martor/toolbar.html:50
9797
msgid "Unordered List"
9898
msgstr ""
9999

100-
#: templates/martor/toolbar.html:35
100+
#: templates/martor/toolbar.html:56
101101
msgid "Ordered List"
102102
msgstr ""
103103

104-
#: templates/martor/toolbar.html:39
104+
#: templates/martor/toolbar.html:62
105105
msgid "URL/Link"
106106
msgstr ""
107107

108-
#: templates/martor/toolbar.html:42
108+
#: templates/martor/toolbar.html:68
109109
msgid "Insert Image Link"
110110
msgstr ""
111111

112-
#: templates/martor/toolbar.html:45 templates/martor/toolbar.html:47
112+
#: templates/martor/toolbar.html:74 templates/martor/toolbar.html:76
113113
msgid "Upload an Image"
114114
msgstr ""
115115

116-
#: templates/martor/toolbar.html:49
116+
#: templates/martor/toolbar.html:81
117117
msgid "Insert Emoji"
118118
msgstr ""
119119

120-
#: templates/martor/toolbar.html:52
120+
#: templates/martor/toolbar.html:87
121121
msgid "Direct Mention a User"
122122
msgstr ""
123123

124-
#: templates/martor/toolbar.html:56
124+
#: templates/martor/toolbar.html:93
125125
msgid "Full Screen"
126126
msgstr ""
127127

128-
#: templates/martor/toolbar.html:59
128+
#: templates/martor/toolbar.html:99
129129
msgid "Markdown Guide (Help)"
130130
msgstr ""
131131

martor/locale/id/LC_MESSAGES/django.po

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2020-01-21 10:54+0700\n"
11+
"POT-Creation-Date: 2020-07-16 11:05+0700\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -54,7 +54,7 @@ msgstr ""
5454
"Situs ini menggunakan Markdown. Untuk dokumentasi lengkapnya <a href="
5555
"\"%(doc_url)s\" target=\"_blank\">klik disini</a>."
5656

57-
#: templates/martor/guide.html:10 templates/martor/toolbar.html:26
57+
#: templates/martor/guide.html:10 templates/martor/toolbar.html:38
5858
msgid "Code"
5959
msgstr "Kode"
6060

@@ -66,68 +66,68 @@ msgstr "Atau"
6666
msgid "... to Get"
6767
msgstr "... untuk Mendapatkan"
6868

69-
#: templates/martor/toolbar.html:4
69+
#: templates/martor/toolbar.html:5
7070
msgid "Bold"
7171
msgstr "Tebal"
7272

73-
#: templates/martor/toolbar.html:7
73+
#: templates/martor/toolbar.html:11
7474
msgid "Italic"
7575
msgstr "Miring"
7676

77-
#: templates/martor/toolbar.html:10
77+
#: templates/martor/toolbar.html:17
7878
msgid "Horizontal Line"
7979
msgstr "Garis Horisontal"
8080

81-
#: templates/martor/toolbar.html:13 templates/martor/toolbar.html:16
82-
#: templates/martor/toolbar.html:17 templates/martor/toolbar.html:18
81+
#: templates/martor/toolbar.html:23 templates/martor/toolbar.html:26
82+
#: templates/martor/toolbar.html:27 templates/martor/toolbar.html:28
8383
msgid "Heading"
8484
msgstr ""
8585

86-
#: templates/martor/toolbar.html:22
86+
#: templates/martor/toolbar.html:34
8787
msgid "Pre or Code"
8888
msgstr "Pre atau Kode"
8989

90-
#: templates/martor/toolbar.html:25
90+
#: templates/martor/toolbar.html:37
9191
msgid "Pre"
9292
msgstr ""
9393

94-
#: templates/martor/toolbar.html:29
94+
#: templates/martor/toolbar.html:44
9595
msgid "Quote"
9696
msgstr "Kutipan"
9797

98-
#: templates/martor/toolbar.html:32
98+
#: templates/martor/toolbar.html:50
9999
msgid "Unordered List"
100100
msgstr "Daftar tak berurut"
101101

102-
#: templates/martor/toolbar.html:35
102+
#: templates/martor/toolbar.html:56
103103
msgid "Ordered List"
104104
msgstr "Daftar berurut"
105105

106-
#: templates/martor/toolbar.html:39
106+
#: templates/martor/toolbar.html:62
107107
msgid "URL/Link"
108108
msgstr ""
109109

110-
#: templates/martor/toolbar.html:42
110+
#: templates/martor/toolbar.html:68
111111
msgid "Insert Image Link"
112112
msgstr "Sisipkan Link Gambar"
113113

114-
#: templates/martor/toolbar.html:45 templates/martor/toolbar.html:47
114+
#: templates/martor/toolbar.html:74 templates/martor/toolbar.html:76
115115
msgid "Upload an Image"
116116
msgstr "Unggah Gambar"
117117

118-
#: templates/martor/toolbar.html:49
118+
#: templates/martor/toolbar.html:81
119119
msgid "Insert Emoji"
120120
msgstr "Sisipkan Emoji"
121121

122-
#: templates/martor/toolbar.html:52
122+
#: templates/martor/toolbar.html:87
123123
msgid "Direct Mention a User"
124124
msgstr "Sebutkan Pengguna secara Langsung"
125125

126-
#: templates/martor/toolbar.html:56
126+
#: templates/martor/toolbar.html:93
127127
msgid "Full Screen"
128128
msgstr "Layar Penuh"
129129

130-
#: templates/martor/toolbar.html:59
130+
#: templates/martor/toolbar.html:99
131131
msgid "Markdown Guide (Help)"
132132
msgstr "Bantuan Penggunaan Markdown"
133133

martor/settings.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,17 @@
1414
}
1515
)
1616

17-
# To setup the martor editor with label or not (default is False)
17+
# To show the toolbar buttons
18+
MARTOR_TOOLBAR_BUTTONS = getattr(
19+
settings, 'MARTOR_TOOLBAR_BUTTONS', [
20+
'bold', 'italic', 'horizontal', 'heading', 'pre-code',
21+
'blockquote', 'unordered-list', 'ordered-list',
22+
'link', 'image-link', 'image-upload', 'emoji',
23+
'direct-mention', 'toggle-maximize', 'help'
24+
]
25+
)
26+
27+
# To setup the martor editor with title label or not (default is False)
1828
MARTOR_ENABLE_LABEL = getattr(
1929
settings, 'MARTOR_ENABLE_LABEL', False
2030
)

martor/static/martor/css/martor-admin.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

martor/static/martor/css/martor.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

martor/static/martor/js/martor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* Name : Martor v1.4.9
2+
* Name : Martor v1.5.0
33
* Created by : Agus Makmun (Summon Agus)
4-
* Release date : 18-Mar-2020
4+
* Release date : 12-Apr-2020
55
* License : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
66
* Repository : https://github.com/agusmakmun/django-markdown-editor
77
**/

martor/static/martor/js/martor.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)