Back to vBulletin 4.x Add-ons

NEW Editor Tags allow you to embed the CodeMirror code editor in posts
Mod Version: 2.00, by nerbert

vB Version: 4.2.1 Rating: (0 vote - 0 average) Installs: 5
Released: 03 Nov 2013 Last Update: 04 Nov 2013 Downloads: 35
Not Supported Uses Plugins Re-usable Code External Content  

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 Editor BBcode Tags to embed EditArea code editor in posts. 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.



Features
  • 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.

Installation
  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!


Notes
  • 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.

Download

File Type: %1$s product-editor_tags.xml (22.8 KB, 32 downloads)
File Type: %1$s codemirror-3.zip (589.0 KB, 34 downloads)

Screenshots

Click image for larger version
Name:	codemirror_tag_admin.jpg
Views:	122
Size:	163.6 KB
ID:	147023   Click image for larger version
Name:	codemirror_tag.png
Views:	371
Size:	43.9 KB
ID:	147024  

Similar Mods

Mini Mods Force Standard Editor for IE10 Users (Editor Workaround) for VB 4.x by BOP5 vBulletin 4.x Add-ons
BB Code Enhancements Editor BBcode Tags to embed EditArea code editor in posts vBulletin 4.x Add-ons
New Posting Features Put tags box above the text editor vBulletin 3.7 Template Modifications

vblts.ru supports vBulletin®, 2022-2024