EditAssist
Questions answered by this recipe
Editing markups can be difficult for someone who cannot see their keyboard easily and
has difficulty finding the right keys to click. Too often I type something incorrectly
and have to backspace and retype it again, sometimes even 5 times. Like for markup
such as (: :) and where was that period, no that was a comma, or things like
%% or # or @ or those braces or that where is that darn *.
Description
This recipe adds buttons to the editor. These buttons type text for you with a
single click. This also enters some common markups so you will just have to fill in
the middle parts. The best part is that it will look at where your cursor is, or if
you have some lines selected, and comment or uncomment line(s) with a click of a button.
(based on recipe HashComments)
Installation
Add one line to you config.php file.
This must appear after a line that I think most
people would use - $EnableGUIButtons = 1 ;
require_once("editassist.php");
Usage
When the editor has focus the buttons will light up, but if the edit area loses
focus they will disable. Click in the edit area and they will enable. All buttons
have a Tooltip so if you do not know what a button does, just move your mouse over it.
When you edit a page the buttons should appear. Place your cursor where you want
and click a button. Select some lines and click button 'Comment' and it will put
a '#' in front of lines that are even partly selected. If lines are not selected
it only affects where the cursor is. Blank lines can be selected, but you will
not see anything when you select them, yet the Comment will comment them out.
If there are any buttons you do not want to use it is easy to disable them in the
PHP script by just putting a '#' in front of any line that start with '$GUIButtons'.
Each button is specified on 1 line and they are nearer the bottom of the code.
There are 5 separators and 52 buttons.
This is a partial screen capture of me editing a page in firefox:
Change log / Release notes
Initial Release: Version 20260409
See also
Comments
See discussion at EditAssist-Talk
User notes : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.