Editor BBcode Tags to embed EditArea code editor in posts
Mod Version: 1.1, by nerbert
vB Version: 4.2.0 |
Rating: (0 vote - 0 average) |
Installs: 6 |
Released: 01 Jun 2013 |
Last Update: 05 Jun 2013 |
Downloads: 45 |
Not Supported
Uses Plugins
Auto-Template
Additional Files
External Content
|
Editor Tags allow you to embed http://www.cdolivet.com/editarea/editarea/docs/about.html code editor in posts as an editable alternative to [code], [html] and [php] tags
This product is no longer supported. See
New Version 1.1 (see below for installation)
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 EditArea code editor displays formatted highlighted code and has the usual features of code editors. It's the editor used in cPanel. Features include search and replace, go to line, undo/redo, syntax and font size selection, highlight toggling, word-wrap toggling and full screen toggling.
Features
- Control panel in Settings > Options > BB Code Settings
- Enable/Disable allows you to turn Editor Tags off without deleting the BB Code. 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.
- Edited code can be saved without editing the post. A Save button saves the EditArea contents to the database with AJAX.
- Default height of the editor can be set in the control panel.
- [New] Resizable in all browsers.
- [New] Works with or without Quick Edit enabled
Installation
- Go to http://sourceforge.net/projects/editarea/ to download the EditArea product. Upload the unzipped editarea_0_8_2 folder to the 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.
- Import the product file in Admin CP.
- Upload the button image to the images/editor folder
- Create the BB Code in the Custom BB Codes feature
Title: Editor Tags
BB Code Tag Name: editor
Replacement:
Code:
<div id="editor_" style="margin:16px 0px;">
<div id="mask_" style="z-index:2;position:relative;background:blue;opacity:0.0;filter:Alpha(opacity=0);display:none;"></div>
<pre id="pre_" class="editortags">{param}</pre>
<textarea id="t_" readonly="" class="editortags">{param}</textarea>
<div id="saveDiv_" class="save">
<span id="progress_" style="visibility:hidden;"><img src="images/misc/progress.gif" style="margin:0px 0px -4px -16px;" alt=""></span>
<input id="save_" class="button" style="margin:2px;display:none" type="button" value="Save" onclick="vB_QuickEditor.preSave(this.parentNode.parentNode)" />
<div id="error_" style="display:none;"></div>
<img id="img_" style="float:right;margin:3px 1px -4px;" alt="" />
<input id="resize_" type="button" style="background:white;opacity:0.0;filter:Alpha(opacity=0); border:none;height:22px;width:13px;float:right;margin:1px -13px -2px 0px;">
<input id="clear_" type="button" class="button" style="display:none;float:right;" value="Clear" onclick="vB_QuickEditor.clearError(this)" />
</div>
<iframe frameborder="0" style="display:none;" onload="if(typeof build != 'undefined') build(this)"></iframe>
</div>
Example: [editor] ..... CODE ..... [/editor]
Description: Puts the EditArea code editor in posts
Use {option} No
Button Image: images/editor/editor.png
Remove Tag If Empty No
Disable BB Code Within This BB Code Yes
Disable Smilies Within This BB Code Yes
Disable Word Wrapping Within This BB Code Yes
Disable Automatic Link Parsing Within This BB Code Yes
- To install the new version 1.1, uninstall the old version, upload the new product file and change the Replacement code in the bbcode setting. Everything else stays the same.
Notes
- Browser compatibility: This has been tested in Chrome, Firefox, Opera and some versions of IE. EditArea will not work well with Opera; the code displays properly but the tab key will not indent the code. There are some problems with IE8 throwing errors, this can be avoided by not placing more than one editor in a single post.
- The product creates two new templates, bbcode_editor_script, which goes in the <head>, and editortags.css.
- If you already have EditArea on your server from this product, EditArea Code Editor for Templates & Plugins in Admin CP, you can use it by changing the path in the <script> tag in bbcode_editor_script template.
Changes
- June 2 2013 Eliminated the progess image to theleft of the Save button. It was causing problems in vB4.2.1. Fixed minor problem with display in IE.
Upload the new product file and overwrite the old one. Change the Replacement code above in the BBcode manager
- June 5 2013 Released new version 1.1. I eliminated the alternative height setting in the admin CP as the editor is now resizable in all browsers.
Download
product-editor_tags.xml (20.5 KB, 29 downloads)
Screenshots
|