diff --git a/app/views/partials/script.php b/app/views/partials/script.php
index 78e5aeb..a30d14b 100644
--- a/app/views/partials/script.php
+++ b/app/views/partials/script.php
@@ -1,7 +1,7 @@
-
+
adminSection) { ?>
diff --git a/public/js/app.js b/public/js/app.js
index 01ba676..90006bb 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -104,13 +104,13 @@ $(document).ready(function() {
// Enable CodeMirror Editor
$.fn.codeMirror = function() {
+ if (this.length === 0) return;
+
editor = CodeMirror.fromTextArea($(this)[0], editorOptions);
editor.setSize('100%', '500');
registerEditorCopy();
-
- return editor;
}
- $('textarea#syntax-code').codeMirror().setOption('mode', 'text/x-csrc');
+ $('textarea#syntax-code').codeMirror();
// Enable WYSIWYG Editor
$('textarea#summernote').summernote({