vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   BB Code Enhancements - NEW Editor Tags allow you to embed the CodeMirror code editor in posts (https://vborg.vbsupport.ru/showthread.php?t=304118)

nerbert 11-02-2013 11:00 PM

NEW Editor Tags allow you to embed the CodeMirror code editor in posts
 
1 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 https://vborg.vbsupport.ru/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.

https://vborg.vbsupport.ru/attachmen...4&d=1383454688

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.

nerbert 11-03-2013 04:04 AM

Reserved

djbaxter 11-03-2013 02:09 PM

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


All times are GMT. The time now is 11:19 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01142 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete