|
Cookbook /
EditOnDblClickSummary: Enable edit on double-clicking a page
Version:
Prerequisites:
Status:
Maintainer:
Categories: Editing
GoalWhen you double click on a page, go to the edit action. SolutionAdd this line to the <body> declaration of the skin template (In the ondblclick="if(window.location.href.indexOf('action=edit') < 0){window.location.href = window.location.href + '?action=edit';}"
--Pyros , Floris practically, the body tag will now look like this : <body ondblclick="if(window.location.href.indexOf('action=edit') < 0){window.location.href = window.location.href + '?action=edit';}">
To avoid having people without edit permissions getting irritated by this wonderful little script it can be modified like this: Put the following in your skin php file, or just the second line in your config file. global $BodyAttr; Then, change the body tag to look like this: <body background=" It will ignore the double click unless the user has edit privileges. If someone wants to rewrite this to look more like the one above, go for it, but this works fine for me. Caveman To avoid editing again (and loose all your modifications) when double-clicking on a word you want to select, while in edition mode, I added a condition on the current action : // if ((CondAuth($pagename, 'edit') == true)&&($_GET['action']!="edit")) $BodyAttr = 'ondblclick="window.location.href=window.location.href + \'?action=edit\'"'; Kaskooy Discussion
Wikiwyg.netI came across the wikiwyg.net and has a very impressive feature for edit. Isn't it similar to the EditOnDoubleClick recipe, but a better one? Has anyone tried to integrate the wikiwyg.net to the pmwiki? Sichendra, March 06, 2006 __A VERY NICE FEATURE, YES!__ It shouldn't be hard to implement. Maybe I'll do it... KMcC Maybe you could use SectionEdit - Split a wiki page into separately editable sections with an edit link for each section - to implement this |