Skip to content

Commit acbfb58

Browse files
committed
Keeping-up-to-date
2 parents 7973fc7 + 19617a8 commit acbfb58

File tree

14 files changed

+205
-131
lines changed

14 files changed

+205
-131
lines changed

README.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,15 @@ to get ``IMGUR_CLIENT_ID`` and ``IMGUR_API_KEY``.
123123
'semantic': 'true', # to enable/disable the packaged semantic ui version
124124
}
125125

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

129137
# 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__ = '[email protected]'

martor/extensions/mdx_video.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def __init__(self, **kwargs):
2020
'yahoo_height': ['351', 'Height for Yahoo! videos'],
2121
'youtube_width': ['560', 'Width for Youtube videos'],
2222
'youtube_height': ['315', 'Height for Youtube videos'],
23+
'youtube_nocookie': [False, 'Use youtube-nocookie.com instead of youtube.com']
2324
}
2425

2526
# Override defaults with user settings
@@ -97,7 +98,10 @@ def handleMatch(self, m):
9798
class Youtube(markdown.inlinepatterns.Pattern):
9899

99100
def handleMatch(self, m):
100-
url = '//www.youtube.com/embed/%s' % m.group('youtubeid')
101+
if self.ext.config['youtube_nocookie'][0]:
102+
url = '//www.youtube-nocookie.com/embed/%s' % m.group('youtubeid')
103+
else:
104+
url = '//www.youtube.com/embed/%s' % m.group('youtubeid')
101105
width = self.ext.config['youtube_width'][0]
102106
height = self.ext.config['youtube_height'][0]
103107
return render_iframe(url, width, height)

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 <[email protected]>\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 <[email protected]>\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
@@ -15,7 +15,17 @@
1515
}
1616
)
1717

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

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.css

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ body.overflow {
88

99
/* Scroll Bar */
1010
.section-martor ::-webkit-scrollbar-track {
11-
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
12-
border-radius: 10px;
13-
background-color: #F5F5F5;
11+
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
12+
border-radius: 10px;
13+
background-color: #F5F5F5;
1414
}
1515
.section-martor ::-webkit-scrollbar {
1616
height: 6px;
17-
width: 6px;
18-
background-color: #F5F5F5;
17+
width: 6px;
18+
background-color: #F5F5F5;
1919
}
2020
.section-martor ::-webkit-scrollbar-thumb {
21-
border-radius: 10px;
22-
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
23-
background-color: #555;
21+
border-radius: 10px;
22+
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
23+
background-color: #555;
2424
}
2525
.ace_scrollbar-v {
2626
cursor: ns-resize;
@@ -90,7 +90,7 @@ form .martor-preview h2,
9090
form .martor-preview h3,
9191
form .martor-preview h4,
9292
form .martor-preview h5,
93-
form .martor-preview h6{margin:20px 0 10px;padding:0;font-weight:bold;-webkit-font-smoothing:antialiased;cursor:text;position:relative;background:none;}
93+
form .martor-preview h6{margin:20px 0 10px;padding:0;font-weight:bold !important;-webkit-font-smoothing:antialiased;cursor:text;position:relative;background:none;}
9494

9595
form .martor-preview h1:hover a.anchor,
9696
form .martor-preview h2:hover a.anchor,
@@ -112,11 +112,11 @@ form .martor-preview h5 code,
112112
form .martor-preview h6 tt,
113113
form .martor-preview h6 code{font-size:inherit}
114114

115-
form .martor-preview h1{font-size:28px;color:#000}
116-
form .martor-preview h2{font-size:24px;border-bottom:1px solid #ccc;color:#000}
117-
form .martor-preview h3{font-size:18px}
118-
form .martor-preview h4{font-size:16px}
119-
form .martor-preview h5{font-size:14px}
115+
form .martor-preview h1{font-size:28px !important;color:#000 !important}
116+
form .martor-preview h2{font-size:24px !important;color:#000 !important}
117+
form .martor-preview h3{font-size:18px !important;}
118+
form .martor-preview h4{font-size:16px !important;}
119+
form .martor-preview h5{font-size:14px !important;text-transform:none !important}
120120
form .martor-preview h6{color:#777;font-size:14px}
121121
form .martor-preview p,
122122
form .martor-preview blockquote,

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

Lines changed: 3 additions & 3 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
**/

0 commit comments

Comments
 (0)