Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enhance syntax highlighting of markdown editor #910

Merged
merged 13 commits into from
Apr 22, 2020
Merged
2 changes: 1 addition & 1 deletion apps/editor/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ module.exports = function(config) {
frameworks: ['jasmine-ajax', 'jasmine-jquery', 'jasmine'],
files: [
'node_modules/codemirror/lib/codemirror.css',
'src/css/toastui-editor.css',
'src/css/editor.css',
'test/unit/fixtures/*.html',
'test/unit/index.js'
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -929,39 +929,6 @@
border: 1px solid #ebebeb;
}

.CodeMirror .cm-header {
font-weight: bold;
color: inherit;
}

.CodeMirror .cm-header-1 {
font-size: 24px;
}

.CodeMirror .cm-header-2 {
font-size: 22px;
}

.CodeMirror .cm-header-3 {
font-size: 20px;
}

.CodeMirror .cm-header-4 {
font-size: 18px;
}

.CodeMirror .cm-header-5 {
font-size: 16px;
}

.CodeMirror .cm-header-6 {
font-size: 14px;
}

.CodeMirror .cm-variable-2 {
color: inherit;
}

.tui-editor-pseudo-clipboard {
position: fixed;
left: -1000px;
Expand Down
94 changes: 94 additions & 0 deletions apps/editor/src/css/md-syntax-highlighting.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
.te-md-container .CodeMirror {
color: #000;
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.tui-md-heading1 {
font-size: 24px;
}

.tui-md-heading2 {
font-size: 22px;
}

.tui-md-heading3 {
font-size: 20px;
}

.tui-md-heading4 {
font-size: 18px;
}

.tui-md-heading5 {
font-size: 16px;
}

.tui-md-heading6 {
font-size: 14px;
}

.tui-md-strong,
.tui-md-heading,
.tui-md-list-item.tui-md-list-item-bullet,
.tui-md-list-item.tui-md-meta {
font-weight: bold;
}

.tui-md-emph {
font-style: italic;
}

.tui-md-strike {
text-decoration: line-through;
}

.tui-md-strike.tui-md-delimiter {
text-decoration: none;
}

.tui-md-delimiter,
.tui-md-thematic-break,
.tui-md-link,
.tui-md-table,
.tui-md-block-quote {
color: #ccc;
}

.tui-md-meta,
.tui-md-link.tui-md-link-url.tui-md-marked-text {
color: #999;
}

.tui-md-block-quote.tui-md-marked-text {
color: #555;
}

.tui-md-table.tui-md-marked-text {
color: #000;
}

.tui-md-link.tui-md-link-desc.tui-md-marked-text,
.tui-md-list-item-odd.tui-md-list-item-bullet {
color: #5182b6;
}

.tui-md-code.tui-md-marked-text,
.tui-md-list-item-even.tui-md-list-item-bullet {
color: #c1788b;
}

.tui-md-code {
background-color: #f9f2f4;
}

.tui-md-code-block.CodeMirror-linebackground {
left: 20px;
right: 20px;
background-color: #f5f7f8;
}

.tui-md-code.tui-md-marked-text,
.tui-md-code-block.tui-md-marked-text {
font-family: Consolas, Courier, 'Apple SD 산돌고딕 Neo', -apple-system, 'Lucida Grande',
'Apple SD Gothic Neo', '맑은 고딕', 'Malgun Gothic', 'Segoe UI', '돋움', dotum, sans-serif;
}
Loading