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
abe86928
Commit
abe86928
authored
Jun 22, 2020
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: markdown spellcheck mode
parent
55bea7d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
+25
-2
editor-markdown.vue
client/components/editor/editor-markdown.vue
+25
-2
No files found.
client/components/editor/editor-markdown.vue
View file @
abe86928
...
...
@@ -100,9 +100,14 @@
span
{{
$t
(
'editor:markup.horizontalBar'
)
}}
template
(
v
-
if
=
'$vuetify.breakpoint.mdAndUp'
)
v
-
spacer
v
-
tooltip
(
bottom
,
color
=
'primary'
,
v
-
if
=
'previewShown'
)
template
(
v
-
slot
:
activator
=
'{ on
}
'
)
v
-
btn
.
animated
.
fadeIn
.
wait
-
p1s
(
icon
,
tile
,
v
-
on
=
'on'
,
@
click
=
'spellModeActive = !spellModeActive'
).
mx
-
0
v
-
icon
(:
color
=
'spellModeActive ? `amber` : `white`'
)
mdi
-
spellcheck
span
{{
$t
(
'editor:markup.toggleSpellcheck'
)
}}
v
-
tooltip
(
bottom
,
color
=
'primary'
)
template
(
v
-
slot
:
activator
=
'{ on
}
'
)
v
-
btn
.
animated
.
fadeIn
.
wait
-
p
11
s
(
icon
,
tile
,
v
-
on
=
'on'
,
@
click
=
'previewShown = !previewShown'
).
mx
-
0
v
-
btn
.
animated
.
fadeIn
.
wait
-
p
2
s
(
icon
,
tile
,
v
-
on
=
'on'
,
@
click
=
'previewShown = !previewShown'
).
mx
-
0
v
-
icon
mdi
-
book
-
open
-
outline
span
{{
$t
(
'editor:markup.togglePreviewPane'
)
}}
.
editor
-
markdown
-
main
...
...
@@ -164,7 +169,13 @@
transition
(
name
=
'editor-markdown-preview'
)
.
editor
-
markdown
-
preview
(
v
-
if
=
'previewShown'
)
.
editor
-
markdown
-
preview
-
content
.
contents
(
ref
=
'editorPreviewContainer'
)
div
(
ref
=
'editorPreview'
,
v
-
html
=
'previewHTML'
)
div
(
ref
=
'editorPreview'
v
-
html
=
'previewHTML'
:
spellcheck
=
'spellModeActive'
:
contenteditable
=
'spellModeActive'
@
blur
=
'spellModeActive = false'
)
v
-
system
-
bar
.
editor
-
markdown
-
sysbar
(
dark
,
status
,
color
=
'grey darken-3'
)
.
caption
.
editor
-
markdown
-
sysbar
-
locale
{{
locale
.
toUpperCase
()
}}
...
...
@@ -372,6 +383,7 @@ export default {
previewShown
:
true
,
previewHTML
:
''
,
helpShown
:
false
,
spellModeActive
:
false
,
insertLinkDialog
:
false
}
}
,
...
...
@@ -396,6 +408,13 @@ export default {
Array
.
from
(
this
.
$refs
.
editorPreview
.
querySelectorAll
(
'pre.line-numbers'
)).
forEach
(
pre
=>
pre
.
classList
.
add
(
'prismjs'
))
}
)
}
}
,
spellModeActive
(
newValue
,
oldValue
)
{
if
(
newValue
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
editorPreview
.
focus
()
}
)
}
}
}
,
methods
:
{
...
...
@@ -828,6 +847,10 @@ $editor-height-mobile: calc(100vh - 112px - 16px);
height
:
$editor
-
height
-
mobile
;
}
>
div
{
outline
:
none
;
}
p
.
line
{
overflow
-
wrap
:
break
-
word
;
}
...
...
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