Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
🐛 fix lazy-loading of CodeMirror interfering with editor (#717)
closes TryGhost/Ghost#8488

- don't lazy-load the CodeMirror styles in `gh-cm-editor` as they are already loaded and overridden
  • Loading branch information
kevinansfield authored and kirrg001 committed May 30, 2017
1 parent f5227fc commit 0d40a60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/components/gh-cm-editor.js
Expand Up @@ -29,7 +29,9 @@ const CmEditorComponent = Component.extend(InvokeActionMixin, {
let loader = this.get('lazyLoader');

RSVP.all([
loader.loadStyle('codemirror', 'assets/codemirror/codemirror.css'),
// NOTE: no need to load the styles because we're already pulling
// them in via SimpleMDE and it causes conflicts with the editor
// loader.loadStyle('codemirror', 'assets/codemirror/codemirror.css'),
loader.loadScript('codemirror', 'assets/codemirror/codemirror.js')
]).then(() => {
scheduleOnce('afterRender', this, function () {
Expand Down
5 changes: 5 additions & 0 deletions app/styles/patterns/global.css
Expand Up @@ -329,6 +329,11 @@ pre tt {
font-size: inherit;
}

.CodeMirror pre {
font-family: var(--font-family-mono);
font-size: 0.9em;
}

kbd {
display: inline-block;
margin-bottom: 0.4em;
Expand Down

0 comments on commit 0d40a60

Please sign in to comment.