soo_editarea Page 1 of 2 »
soo_editarea
Summary:
Add EditArea code highlighting to Txp admin textareas.
Download
soo_editarea version 0.1.5, 3.3 KB(If it won’t install try the compressed version)
Optional:
soo_plugin_pref version 0.2.2, 3.2 KB
(If it won’t install try the
compressed version)
Required: EditArea files (copy the enclosed edit_area directory into the /textpattern directory)
Optional: Textpattern syntax file (copy to edit_area/reg_syntax directory)
Screenshots of EditArea in Txp:
Overview
EditArea is a JavaScript-based code editor for browser textareas. Features include:
- Code highlighting
- Browser tab-key override for proper tabbing in the textarea
- Full-screen mode
- Find & replace w/ regex support
- Multiple undo/redo
soo_editarea provides easy integration of EditArea into Textpattern. (Well, pretty easy: there are a few steps involved.)
Suggested by the (apparently defunct) atb_editarea plugin, and discussion on the Txp forum.
Features:
You can set plugin preferences for:
- Syntax language for Page & Form editing, allowing custom syntax file
- Source path, making it easier to share one EditArea installation across multiple sites
- Various EditArea options (tooltip language, font size & family, &c.)
Installation
Install and activate the plugin in the usual way.
Download EditArea and place the edit_area directory in a server-accessible location of your choice. (The default is /textpattern/edit_area, but you can change this in the plugin’s Options settings.)
Optionally, download the txp.js syntax file (or create your own) and place it in edit_area/reg_syntax.
Configuration options
The first two steps in Installation, above, are all you need to get EditArea working with standard HTML syntax highlighting for Pages and Forms, and CSS highlighting for Styles.
To activate the Txp syntax file (from step 3, above), or to use a different location for the EditArea files, install and activate the soo_plugin_pref plugin (Txp 4.2.0 or greater required). Then, in the main plugin panel, click the Options link for soo_editarea (look in the Manage column at right).
To use the Txp syntax file, change the Page Template and Form syntax setting to “txp”.
The EditArea directory setting is the URL (relative to /textpattern/index.php) of the EditArea files. (Hint: for sharing one set of EditArea files across multiple sites, put the files in any server-accessible location you choose, then add a symbolic link to each site’s /textpattern directory.)
More options:
- Language: for EditArea tooltips. Use the two-letter code corresponding to the file in
edit_area/langs. - Font size: default font size for the editor
- Font family: comma-separated list of font names (default “monospace”).
- Editor height: default height of the EditArea textarea
- Editor width: as above, for width
- Convert tab to spaces: convert tabs to this many spaces (leave at 0 for standard tabs)
- EditArea Plugins: comma-separated list of EditArea plugins (e.g. zencoding). It’s up to you to install any such plugins appropriately.
Txp tag highlighting
By default the plugin uses EditArea’s HTML highlighting for Page Template and Form editing, giving Txp tags the same highlight color as HTML tags. To have Txp tags appear in a different color, follow the installation/configuration instructions above for adding the txp.js file. (If you later upgrade the EditArea files you will have to remember to preserve this file.)
The txp.js file linked above highlights Txp tags in a lovely orange color. To change it (or any of the other colors), edit txp.js to suit (look toward the bottom of the file). If you’d prefer a soothing green for your Txp tags, uncomment the line near the bottom labeled “green”, and comment the line above it labeled “orange” (i.e., remove the two slashes at the start of the “green” line, and add two slashes to the start of the “orange” line).
Known issues
EditArea, as of version 0.8.2, has problems with some versions of Safari — phantom text creating a blurred effect. See the soo_editarea support topic for possible solutions. Or check EditArea’s issue tracker.
Version History
0.1.5 (2012/01/24)
- Added pref for EditArea plugins (as requested by mrdale)
0.1.4 (2011/04/27)
- Added default height/width prefs (as requested by mrdale)
0.1.3 (2010/12/30)
- Fixed bug with Internet Explorer (
typeattribute inscripttag) - General code cleaning
0.1.2 (2010/12/20)
- Added preference settings for several EditArea options
0.1.1 (2010/12/20)
- Documentation update [thanks to Marc C. for the suggestions]
0.1.0 (2010/12/20)
- Initial release
- EditArea integration for Txp’s Page Template, Form, and CSS editors
- soo_editarea
- Next

