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 sourceforge 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
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.
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.
I finished a new Version 1.1, which allows resizing in all browsers, so the special height setting in the admin CP is no longer needed. Also editing is possible regardless of whether Quick Edit is enabled. Fixed miscellaneous minor bugs.
I finished a new Version 1.1, which allows resizing in all browsers, so the special height setting in the admin CP is no longer needed. Also editing is possible regardless of whether Quick Edit is enabled. Fixed miscellaneous minor bugs.
I don't use this any more because I have something better. It has a minor imperfection or two I've been trying to fix but since I have so many other things going on I think I'll just post it as is.
The new product uses the CodeMirror editor and is completely different from this so I'll start a new product thread. I have to test it some more and tidy it up so give me a few hours.
I'll post a link here when I post the new product.