Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
9e875794
Unverified
Commit
9e875794
authored
Apr 23, 2023
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: markdown editor with monaco (wip)
parent
97bcc56c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
208 additions
and
107 deletions
+208
-107
package-lock.json
ux/package-lock.json
+0
-0
package.json
ux/package.json
+1
-0
quasar.config.js
ux/quasar.config.js
+14
-1
monaco.js
ux/src/boot/monaco.js
+23
-0
EditorMarkdown.vue
ux/src/components/EditorMarkdown.vue
+170
-106
monacoTypes.js
ux/src/helpers/monacoTypes.js
+0
-0
No files found.
ux/package-lock.json
View file @
9e875794
B
{
...
...
ux/package.json
View file @
9e875794
...
...
@@ -73,6 +73,7 @@
"markdown-it-sup"
:
"1.0.0"
,
"markdown-it-task-lists"
:
"2.1.1"
,
"mitt"
:
"3.0.0"
,
"monaco-editor"
:
"0.37.1"
,
"pako"
:
"2.1.0"
,
"pinia"
:
"2.0.33"
,
"prosemirror-commands"
:
"1.5.1"
,
...
...
ux/quasar.config.js
View file @
9e875794
...
...
@@ -39,7 +39,11 @@ module.exports = configure(function (/* ctx */) {
'apollo'
,
'components'
,
'eventbus'
,
'i18n'
'i18n'
,
{
server
:
false
,
path
:
'monaco'
}
],
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
...
...
@@ -99,6 +103,15 @@ module.exports = configure(function (/* ctx */) {
'prosemirror-model'
,
'prosemirror-view'
]
viteConf
.
build
.
rollupOptions
=
{
external
:
[
'monaco-editor'
],
output
:
{
globals
:
{
'monaco-editor'
:
'monaco-editor'
}
}
}
},
// viteVuePluginOptions: {},
...
...
ux/src/boot/monaco.js
0 → 100644
View file @
9e875794
import
EditorWorker
from
'monaco-editor/esm/vs/editor/editor.worker?worker'
import
JsonWorker
from
'monaco-editor/esm/vs/language/json/json.worker?worker'
import
CssWorker
from
'monaco-editor/esm/vs/language/css/css.worker?worker'
import
HtmlWorker
from
'monaco-editor/esm/vs/language/html/html.worker?worker'
import
TsWorker
from
'monaco-editor/esm/vs/language/typescript/ts.worker?worker'
self
.
MonacoEnvironment
=
{
getWorker
(
_
,
label
)
{
if
(
label
===
'json'
)
{
return
new
JsonWorker
()
}
if
(
label
===
'css'
||
label
===
'scss'
||
label
===
'less'
)
{
return
new
CssWorker
()
}
if
(
label
===
'html'
||
label
===
'handlebars'
||
label
===
'razor'
)
{
return
new
HtmlWorker
()
}
if
(
label
===
'typescript'
||
label
===
'javascript'
)
{
return
new
TsWorker
()
}
return
new
EditorWorker
()
}
}
ux/src/components/EditorMarkdown.vue
View file @
9e875794
This diff is collapsed.
Click to expand it.
ux/src/helpers/monacoTypes.js
0 → 100644
View file @
9e875794
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment