vBulletin Mods

The Official vBulletin Modifications Site

NEW Editor Tags allow you to embed the CodeMirror code editor in posts
by nerbert
03 Nov 2013 04:00

4 Attachment(s)
NEW Editor Tags allow you to embed the CodeMirror code editor in posts as an editable alternative to [code], [html] and [php] tags

This is a whole new version of editor tags that replaces the ones here http://www.vbulletin.org/forum/showthread.php?t=298625. This new version uses the CodeMirror editor instead of EditArea.

Use [editor] tags to display, edit and store code in posts. You can edit code and save it in the database without editing the post, just click the Save button at the bottom of the editor.

The codeMirror code editor displays formatted highlighted code and has the usual features of code editors. Features include search and replace, highlight matching, undo/redo, syntax and font size selection, auto indent, auto format, go to line and word-wrap toggling.


  • Control panel in Settings > Options > BB Code Settings

  • Enable/Disable allows you to turn Editor Tags on and off. When Editor Tags are disabled, code posted in Editor Tags will show in a pre element much like a Code Tag display.

  • By default, editing permission is the same as editing for the post. You can disable editing globally in the control panel or disallow groups to edit code.

  • Edited code can be saved without editing the post. A Save button saves the CodeMirror contents to the database with AJAX.

  • The max character limit for posts can be overridden to allow posting and editing of large files

  • Default height of the editor can be set in the control panel.

  • Resizable in all browsers.

  1. If you already have the old version using EditArea, delete the bb code in the BB Code Manager and uninstall the old version. Unless you have some other use for it, delete all the EditArea files.

  2. Unzip the CodeMirror package and upload it as a subdirectory in clientscript folder.

    Note: The easy way to upload large packages is to first create an "upload_zips" folder in your forum root, then upload the zipped file there. Then unzip the file and by default the new folder will be in the upload_zips folder. You can then move or copy it to clientscript.

  3. Import the product file in Admin CP. No need to use the BB Code feature, the plugins do all the work!

  • Browser compatibility: This has been tested in Chrome, Firefox, Opera and some versions of IE.

  • The product creates three new templates, bbcode_editor, bbcode_editor_script, which goes in the <head>, and editortags.css.

nerbert 03 Nov 2013 04:04


djbaxter 03 Nov 2013 14:09

Nice idea. I can see this being a very nice addition to certain types of forums.

All times are GMT. The time now is 10:58.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.