Skip to content

Commit

Permalink
revert: conditionally load codemirror plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Mar 14, 2018
1 parent da40e19 commit 433dd72
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/app/ngx-editor/ngx-editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,8 @@ import {
} from '@angular/core';
import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';
import * as CodeMirror from 'codemirror';

if (CodeMirror instanceof Function) {
import('codemirror/addon/display/placeholder.js')
.then(() => {
console.log('CodeMirror: Placeholder addon loaded');
});

import('codemirror/mode/htmlmixed/htmlmixed.js')
.then(() => {
console.log('CodeMirror: HTML Mixed plugin loaded');
});
} else {
console.log('CodeMirror not installed');
}
import 'codemirror/addon/display/placeholder.js';
import 'codemirror/mode/htmlmixed/htmlmixed.js';

import { CommandExecutorService } from './common/services/command-executor.service';
import { MessageService } from './common/services/message.service';
Expand Down

0 comments on commit 433dd72

Please sign in to comment.