Skip to content

Commit 54dbf9a

Browse files
dzruykNGPixel
andauthored
feat: add asciidoc editor module (#5954)
* feat: add asciidoc editor module * fix storage file extension for asciidoc pages * fix: asciidoc editor + rendering improvements * fix: description list css improvements Co-authored-by: NGPixel <github@ngpixel.com>
1 parent eadefb8 commit 54dbf9a

File tree

15 files changed

+1039
-192
lines changed

15 files changed

+1039
-192
lines changed

client/components/admin.vue

-12
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,6 @@
6565
v-list-item(to='/comments')
6666
v-list-item-avatar(size='24', tile): v-icon mdi-comment-text-outline
6767
v-list-item-title {{ $t('admin:comments.title') }}
68-
v-list-item(to='/editor', disabled)
69-
v-list-item-avatar(size='24', tile): v-icon(color='grey lighten-2') mdi-playlist-edit
70-
v-list-item-title {{ $t('admin:editor.title') }}
71-
v-list-item(to='/extensions')
72-
v-list-item-avatar(size='24', tile): v-icon mdi-chip
73-
v-list-item-title {{ $t('admin:extensions.title') }}
74-
v-list-item(to='/logging', disabled)
75-
v-list-item-avatar(size='24', tile): v-icon(color='grey lighten-2') mdi-script-text-outline
76-
v-list-item-title {{ $t('admin:logging.title') }}
7768
v-list-item(to='/rendering', color='primary')
7869
v-list-item-avatar(size='24', tile): v-icon mdi-cogs
7970
v-list-item-title {{ $t('admin:rendering.title') }}
@@ -104,9 +95,6 @@
10495
v-list-item(to='/utilities', color='primary', v-if='hasPermission(`manage:system`)')
10596
v-list-item-avatar(size='24', tile): v-icon mdi-wrench-outline
10697
v-list-item-title {{ $t('admin:utilities.title') }}
107-
v-list-item(to='/webhooks', v-if='hasPermission(`manage:system`)', disabled)
108-
v-list-item-avatar(size='24', tile): v-icon(color='grey lighten-2') mdi-webhook
109-
v-list-item-title {{ $t('admin:webhooks.title') }}
11098
v-list-group(
11199
to='/dev'
112100
no-action

client/components/editor.vue

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export default {
7777
editorApi: () => import(/* webpackChunkName: "editor-api", webpackMode: "lazy" */ './editor/editor-api.vue'),
7878
editorCode: () => import(/* webpackChunkName: "editor-code", webpackMode: "lazy" */ './editor/editor-code.vue'),
7979
editorCkeditor: () => import(/* webpackChunkName: "editor-ckeditor", webpackMode: "lazy" */ './editor/editor-ckeditor.vue'),
80+
editorAsciidoc: () => import(/* webpackChunkName: "editor-asciidoc", webpackMode: "lazy" */ './editor/editor-asciidoc.vue'),
8081
editorMarkdown: () => import(/* webpackChunkName: "editor-markdown", webpackMode: "lazy" */ './editor/editor-markdown.vue'),
8182
editorRedirect: () => import(/* webpackChunkName: "editor-redirect", webpackMode: "lazy" */ './editor/editor-redirect.vue'),
8283
editorModalEditorselect: () => import(/* webpackChunkName: "editor", webpackMode: "eager" */ './editor/editor-modal-editorselect.vue'),

client/components/editor/markdown/fold.js client/components/editor/common/cmFold.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ const maxDepth = 100
77
const codeBlockStartMatch = /^`{3}[a-zA-Z0-9]+$/
88
const codeBlockEndMatch = /^`{3}$/
99

10-
CodeMirror.registerHelper('fold', 'markdown', function (cm, start) {
10+
export default {
11+
register(lang) {
12+
CodeMirror.registerHelper('fold', lang, foldHandler)
13+
}
14+
}
15+
16+
function foldHandler (cm, start) {
1117
const firstLine = cm.getLine(start.line)
1218
const lastLineNo = cm.lastLine()
1319
let end
@@ -59,4 +65,4 @@ CodeMirror.registerHelper('fold', 'markdown', function (cm, start) {
5965
from: CodeMirror.Pos(start.line, firstLine.length),
6066
to: CodeMirror.Pos(end, cm.getLine(end).length)
6167
}
62-
})
68+
}

0 commit comments

Comments
 (0)