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
5e8dfcc2
Commit
5e8dfcc2
authored
Feb 25, 2018
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: editor preview emoji + task lists
parent
a3948c7f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
8 deletions
+21
-8
editor-code.vue
client/components/editor-code.vue
+5
-1
app.scss
client/scss/app.scss
+1
-1
print.scss
client/scss/base/print.scss
+0
-2
markdown-content.scss
client/scss/components/markdown-content.scss
+15
-4
No files found.
client/components/editor-code.vue
View file @
5e8dfcc2
...
...
@@ -111,6 +111,8 @@ import 'codemirror/addon/search/match-highlighter.js'
// Markdown-it
import
MarkdownIt
from
'markdown-it'
import
mdEmoji
from
'markdown-it-emoji'
import
mdTaskLists
from
'markdown-it-task-lists'
import
Prism
from
'../libs/prism/prism.js'
const
md
=
new
MarkdownIt
({
...
...
@@ -122,6 +124,8 @@ const md = new MarkdownIt({
return
`<pre class="line-numbers"><code class="language-
${
lang
}
">
${
str
}
</code></pre>`
}
})
.
use
(
mdEmoji
)
.
use
(
mdTaskLists
)
export
default
{
components
:
{
...
...
@@ -131,7 +135,7 @@ export default {
return
{
fabMainMenu
:
false
,
fabInsertMenu
:
false
,
code
:
'# Header 1
\
n
\
nSample **Text**
\
nhttp://wiki.js.org
\
n
\
n## Header 2
\
nSample Text
\
n
\
n```javascript
\
nvar test = require("test");
\
n
\
n// some comment
\
nconst foo = bar(
\'
param
\'
) + 1.234;
\
n```
'
,
code
:
'# Header 1
\
n
\
nSample **Text**
\
nhttp://wiki.js.org
\
n
:rocket: :) :( :| :P
\
n
\
n## Header 2
\
nSample Text
\
n
\
n```javascript
\
nvar test = require("test");
\
n
\
n// some comment
\
nconst foo = bar(
\'
param
\'
) + 1.234;
\
n```
\
n
\
n### Header 3
\
nLorem *ipsum* ~~text~~
'
,
cmOptions
:
{
tabSize
:
2
,
mode
:
'text/markdown'
,
...
...
client/scss/app.scss
View file @
5e8dfcc2
...
...
@@ -12,7 +12,7 @@
@import
'components/toggle'
;
@import
'components/typography'
;
@import
'../libs/twemoji/twemoji-awesome'
;
//
@import '../libs/twemoji/twemoji-awesome';
@import
'../libs/prism/prism.css'
;
@import
'node_modules/diff2html/dist/diff2html.min'
;
...
...
client/scss/base/print.scss
View file @
5e8dfcc2
...
...
@@ -35,6 +35,4 @@
}
}
}
@import
'node_modules/highlight.js/styles/atom-one-light'
;
}
client/scss/components/markdown-content.scss
View file @
5e8dfcc2
.markdown-content
{
font-size
:
1rem
;
color
:
mc
(
'blue-grey'
,
'
9
00'
);
color
:
mc
(
'blue-grey'
,
'
8
00'
);
// --------------------------------------------
// Headers
// --------------------------------------------
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
color
:
mc
(
'blue-grey'
,
'800'
);
color
:
mc
(
'blue-grey'
,
'700'
);
font-weight
:
600
;
}
>
*
+
h1
,
>
*
+
h2
,
>
*
+
h3
,
>
*
+
h4
{
...
...
@@ -15,16 +16,17 @@
}
h1
{
font-size
:
1
.5rem
;
border-bottom
:
1
px
solid
mc
(
'blue-grey'
,
'100'
);
border-bottom
:
2
px
solid
mc
(
'blue-grey'
,
'100'
);
margin-bottom
:
1rem
;
}
h2
{
font-size
:
1
.25rem
;
border-bottom
:
1px
dotte
d
mc
(
'blue-grey'
,
'100'
);
border-bottom
:
1px
soli
d
mc
(
'blue-grey'
,
'100'
);
margin-bottom
:
.75rem
;
}
h3
{
font-size
:
1
.15rem
;
border-bottom
:
1px
dotted
mc
(
'blue-grey'
,
'100'
);
margin-bottom
:
.5rem
;
}
h4
{
...
...
@@ -58,4 +60,13 @@
}
}
}
.task-list-item
{
display
:
flex
;
align-items
:
center
;
&
-checkbox
{
margin-right
:
.5rem
;
}
}
}
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