nodebb-plugin-markdown 12.2.4 → 12.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +1 -1
- package/public/js/markdown.js +16 -16
- package/public/languages/de/markdown.json +8 -7
- package/public/languages/en-GB/markdown.json +8 -8
- package/public/languages/fa-IR/markdown.json +7 -7
- package/public/languages/fr/markdown.json +7 -7
- package/public/languages/he/markdown.json +8 -8
- package/public/languages/pl/markdown.json +7 -7
- package/public/languages/ru/markdown.json +7 -7
- package/public/languages/tr/markdown.json +7 -7
- package/public/languages/zh-CN/markdown.json +7 -7
package/index.js
CHANGED
|
@@ -266,7 +266,7 @@ const Markdown = {
|
|
|
266
266
|
},
|
|
267
267
|
|
|
268
268
|
renderHelp: async function (helpContent) {
|
|
269
|
-
const translated = await translator.translate('[[markdown:
|
|
269
|
+
const translated = await translator.translate('[[markdown:help-text]]');
|
|
270
270
|
const parsed = await plugins.hooks.fire('filter:parse.raw', `## Markdown\n${translated}`);
|
|
271
271
|
const html = await app.renderAsync('modals/markdown-help', {});
|
|
272
272
|
helpContent += parsed + html;
|
package/package.json
CHANGED
package/public/js/markdown.js
CHANGED
|
@@ -119,11 +119,11 @@ export function prepareFormattingTools() {
|
|
|
119
119
|
|
|
120
120
|
formatting.addButtonDispatch('list', function (textarea, selectionStart, selectionEnd) {
|
|
121
121
|
if (selectionStart === selectionEnd) {
|
|
122
|
-
controls.insertIntoTextarea(textarea, '\n* ' + strings
|
|
122
|
+
controls.insertIntoTextarea(textarea, '\n* ' + strings['list-item']);
|
|
123
123
|
|
|
124
124
|
// Highlight "list item"
|
|
125
125
|
controls.updateTextareaSelection(
|
|
126
|
-
textarea, selectionStart + 3, selectionStart + strings.
|
|
126
|
+
textarea, selectionStart + 3, selectionStart + strings['list-item'].length + 3
|
|
127
127
|
);
|
|
128
128
|
} else {
|
|
129
129
|
const selectedText = $(textarea).val().substring(selectionStart, selectionEnd);
|
|
@@ -141,9 +141,9 @@ export function prepareFormattingTools() {
|
|
|
141
141
|
// At end of bolded string, move cursor past delimiters
|
|
142
142
|
controls.updateTextareaSelection(textarea, selectionStart + 2, selectionStart + 2);
|
|
143
143
|
} else {
|
|
144
|
-
controls.insertIntoTextarea(textarea, '~~' + strings
|
|
144
|
+
controls.insertIntoTextarea(textarea, '~~' + strings['strikethrough-text'] + '~~');
|
|
145
145
|
controls.updateTextareaSelection(
|
|
146
|
-
textarea, selectionStart + 2, selectionEnd + strings.
|
|
146
|
+
textarea, selectionStart + 2, selectionEnd + strings['strikethrough-text'].length + 2
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
149
|
} else {
|
|
@@ -156,9 +156,9 @@ export function prepareFormattingTools() {
|
|
|
156
156
|
|
|
157
157
|
formatting.addButtonDispatch('code', function (textarea, selectionStart, selectionEnd) {
|
|
158
158
|
if (selectionStart === selectionEnd) {
|
|
159
|
-
controls.insertIntoTextarea(textarea, '```\n' + strings
|
|
159
|
+
controls.insertIntoTextarea(textarea, '```\n' + strings['code-text'] + '\n```');
|
|
160
160
|
controls.updateTextareaSelection(
|
|
161
|
-
textarea, selectionStart + 4, selectionEnd + strings.
|
|
161
|
+
textarea, selectionStart + 4, selectionEnd + strings['code-text'].length + 4
|
|
162
162
|
);
|
|
163
163
|
} else {
|
|
164
164
|
var wrapDelta = controls.wrapSelectionInTextareaWith(textarea, '```\n', '\n```');
|
|
@@ -170,32 +170,32 @@ export function prepareFormattingTools() {
|
|
|
170
170
|
|
|
171
171
|
formatting.addButtonDispatch('link', function (textarea, selectionStart, selectionEnd) {
|
|
172
172
|
if (selectionStart === selectionEnd) {
|
|
173
|
-
controls.insertIntoTextarea(textarea, '[' + strings
|
|
173
|
+
controls.insertIntoTextarea(textarea, '[' + strings['link-text'] + '](' + strings['link-url'] + ')');
|
|
174
174
|
controls.updateTextareaSelection(
|
|
175
175
|
textarea,
|
|
176
|
-
selectionStart + strings.
|
|
177
|
-
selectionEnd + strings.
|
|
176
|
+
selectionStart + strings['link-text'].length + 3,
|
|
177
|
+
selectionEnd + strings['link-text'].length + strings['link-url'].length + 3
|
|
178
178
|
);
|
|
179
179
|
} else {
|
|
180
|
-
var wrapDelta = controls.wrapSelectionInTextareaWith(textarea, '[', '](' + strings
|
|
180
|
+
var wrapDelta = controls.wrapSelectionInTextareaWith(textarea, '[', '](' + strings['link-url'] + ')');
|
|
181
181
|
controls.updateTextareaSelection(
|
|
182
|
-
textarea, selectionEnd + 3 - wrapDelta[1], selectionEnd + strings.
|
|
182
|
+
textarea, selectionEnd + 3 - wrapDelta[1], selectionEnd + strings['link-url'].length + 3 - wrapDelta[1]
|
|
183
183
|
);
|
|
184
184
|
}
|
|
185
185
|
});
|
|
186
186
|
|
|
187
187
|
formatting.addButtonDispatch('picture-o', function (textarea, selectionStart, selectionEnd) {
|
|
188
188
|
if (selectionStart === selectionEnd) {
|
|
189
|
-
controls.insertIntoTextarea(textarea, '![' + strings
|
|
189
|
+
controls.insertIntoTextarea(textarea, '![' + strings['picture-text'] + '](' + strings['picture-url'] + ')');
|
|
190
190
|
controls.updateTextareaSelection(
|
|
191
191
|
textarea,
|
|
192
|
-
selectionStart + strings.
|
|
193
|
-
selectionEnd + strings.
|
|
192
|
+
selectionStart + strings['picture-text'].length + 4,
|
|
193
|
+
selectionEnd + strings['picture-text'].length + strings['picture-url'].length + 4
|
|
194
194
|
);
|
|
195
195
|
} else {
|
|
196
|
-
var wrapDelta = controls.wrapSelectionInTextareaWith(textarea, '');
|
|
197
197
|
controls.updateTextareaSelection(
|
|
198
|
-
textarea, selectionEnd + 4 - wrapDelta[1], selectionEnd + strings.
|
|
198
|
+
textarea, selectionEnd + 4 - wrapDelta[1], selectionEnd + strings['picture-url'].length + 4 - wrapDelta[1]
|
|
199
199
|
);
|
|
200
200
|
}
|
|
201
201
|
});
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bold": "Fettschrift",
|
|
3
3
|
"italic": "Kursivschrift",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
4
|
+
"list-item": "Listenpunkt",
|
|
5
|
+
"strikethrough-text": "Durchgestrichen",
|
|
6
|
+
"code-text": "code_text",
|
|
7
|
+
"link-text": "Link Text",
|
|
8
|
+
"link-url": "Link Adresse",
|
|
9
|
+
"picture-text": "Bild Text",
|
|
10
|
+
"picture-url": "Bild Link",
|
|
11
|
+
"help-text": "Dieses Forum unterstützt Markdown. Für mehr Informationen, [hier klicken](http://commonmark.org/help/)"
|
|
11
12
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bold": "bolded text",
|
|
3
3
|
"italic": "italicised text",
|
|
4
|
-
"
|
|
4
|
+
"list-item": "list item",
|
|
5
5
|
"heading": "heading",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
6
|
+
"strikethrough-text": "strikethrough text",
|
|
7
|
+
"code-text": "code_text",
|
|
8
|
+
"link-text": "link text",
|
|
9
|
+
"link-url": "link url",
|
|
10
|
+
"picture-text": "alt text",
|
|
11
|
+
"picture-url": "image url",
|
|
12
|
+
"help-text": "This forum is powered by Markdown. For full documentation, [click here](http://commonmark.org/help/)"
|
|
13
13
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bold": "متن پررنگ",
|
|
3
3
|
"italic": "متن ایتالیک ( کج )",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
4
|
+
"list-item": "لیست",
|
|
5
|
+
"strikethrough-text": "متن خط خورده",
|
|
6
|
+
"link-text": "متن لینک",
|
|
7
|
+
"link-url": "آدرس لینک",
|
|
8
|
+
"picture-text": "متن جایگزین",
|
|
9
|
+
"picture-url": "آدرس عکس",
|
|
10
|
+
"help-text": "این انجمن از زبان مارک دون استفاده می کند، برای اطلاعات بیشتر [اینجا](http://commonmark.org/help/) کلیک کنید!"
|
|
11
11
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bold": "texte en gras",
|
|
3
3
|
"italic": "texte en italique",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
4
|
+
"list-item": "élément de liste",
|
|
5
|
+
"strikethrough-text": "strikethrough text",
|
|
6
|
+
"link-text": "texte du lien",
|
|
7
|
+
"link-url": "url du lien",
|
|
8
|
+
"picture-text": "text alternatif",
|
|
9
|
+
"picture-url": "url de l'image",
|
|
10
|
+
"help-text": "Ce forum utilise la syntaxe Markdown. Pour accéder à la documentation, suivre ce [lien](http://commonmark.org/help/)"
|
|
11
11
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bold": "טקסט מודגש",
|
|
3
3
|
"italic": "טקסט נטוי",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
4
|
+
"list-item": "פריט רשימה",
|
|
5
|
+
"strikethrough-text": "קו חוצה",
|
|
6
|
+
"code-text": "קוד",
|
|
7
|
+
"link-text": "טקסט קישור",
|
|
8
|
+
"link-url": "כתובת קישור",
|
|
9
|
+
"picture-text": "כיתוב בבעיות טעינה",
|
|
10
|
+
"picture-url": "כתובת תמונה",
|
|
11
|
+
"help-text": "הפורום עובד עם Markdown. להסבר מלא, [לחץ כאן](http://commonmark.org/help/)"
|
|
12
12
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bold": "pogrubienie",
|
|
3
3
|
"italic": "pochylenie",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
4
|
+
"list-item": "wypunktowanie",
|
|
5
|
+
"strikethrough-text": "przekreślenie",
|
|
6
|
+
"link-text": "tekst odnośnika",
|
|
7
|
+
"link-url": "url odnośnika",
|
|
8
|
+
"picture-text": "text alternatywny",
|
|
9
|
+
"picture-url": "url obrazu",
|
|
10
|
+
"help-text": "Forum działa dzięki Markdown. By uzyskać pełną dokumentację, [kliknij tutaj](http://commonmark.org/help/)"
|
|
11
11
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bold": "Жирный текст",
|
|
3
3
|
"italic": "Прописной шрифт",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
4
|
+
"list-item": "Пункт списка",
|
|
5
|
+
"strikethrough-text": "Зачеркнутый текст",
|
|
6
|
+
"link-text": "Текст ссылки",
|
|
7
|
+
"link-url": "Адрес ссылки",
|
|
8
|
+
"picture-text": "Описание",
|
|
9
|
+
"picture-url": "URL-адрес изображения",
|
|
10
|
+
"help-text": "Этот форум работает на основе Markdown. Для получения полной документации [перейдите на сайт](http://commonmark.org/help/)"
|
|
11
11
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bold": "kalın yazı",
|
|
3
3
|
"italic": "İtalik yazı",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
4
|
+
"list-item": "liste madde",
|
|
5
|
+
"strikethrough-text": "Üstü çizili metin",
|
|
6
|
+
"link-text": "bağlantı metni",
|
|
7
|
+
"link-url": "link url",
|
|
8
|
+
"picture-text": "alt metni",
|
|
9
|
+
"picture-url": "görsel url",
|
|
10
|
+
"help-text": "This forum is powered by Markdown. For full documentation, [click here](http://commonmark.org/help/)"
|
|
11
11
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bold": "粗体字",
|
|
3
3
|
"italic": "斜体字",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
4
|
+
"list-item": "列表",
|
|
5
|
+
"strikethrough-text": "删除线",
|
|
6
|
+
"link-text": "链接文本",
|
|
7
|
+
"link-url": "链接地址",
|
|
8
|
+
"picture-text": "替代文字",
|
|
9
|
+
"picture-url": "图片地址",
|
|
10
|
+
"help-text": "该论坛使用 Markdown 语法。[点此查看](http://commonmark.org/help/) 语法说明。"
|
|
11
11
|
}
|