The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Add Codemirror to AdminCP for Syntax Highlighting
I have been spoiled using text editors with syntax highlighting and always wanted to add it to the admincp template editor. If you want to have it too, here you go. Download CodeMirror and place the extracted folder in your forum root "/forum/codemirror"
Then in the admincp/template.php file I added the following lines Code:
<script src="../codemirror/lib/codemirror.js"></script> <link rel="stylesheet" href="../codemirror/lib/codemirror.css"> <script src="../codemirror/mode/javascript/javascript.js"></script> <script src="../codemirror/mode/xml/xml.js"></script> <script src="../codemirror/mode/javascript/javascript.js"></script> <script src="../codemirror/mode/css/css.js"></script> <script src="../codemirror/mode/htmlmixed/htmlmixed.js"></script> <script src="../codemirror/mode/htmlembedded/htmlembedded.js"></script> Code:
<link rel="stylesheet" href="styles/default.css"> //code goes here <?php } Code:
<script> var editor = CodeMirror.fromTextArea(document.getElementById("ta_template_2"), { mode: "application/x-ejs", styleActiveLine: true, lineNumbers: true, lineWrapping: true }); </script> Here is a screenshot of what it looks like: |
Благодарность от: | ||
Scanu |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|