Wiki source for WikkaEdit
=====What is ""WikkaEdit"" ?=====
>>==See also==
~-[[Docs:WikkaEdit | WikkaEdit documentation]]
~-[[Docs:WhatsNew | What's new in the latest release of WikkaWiki]]
>>[[Docs:WikkaEdit | WikkaEdit]] is a new editor toolbar designed by OlivierBorowski to replace WikiEdit ([[http://wackowiki.com/WikiEdit | official website]]). Indeed, WikiEdit is no more actively maintained (latest improvements are from 2004).
[[Docs:WikkaEdit | WikkaEdit]] comes in two flavours, a //simple version// featuring a more streamlined and user/friendly interface than WikiEdit and an //advanced version// with built-in action support. The simple version is included with the [[Docs:WhatsNew1164 | 1.1.6.4 release]], while a first proof-of-concept of the advanced version is available in [[WikkaUnstable | trunk]] and will be included with the [[http://wush.net/trac/wikka/milestone/1.1.7 | 1.1.7 release]].
===Demo server===
- **simple version** (Wikkawiki 1.1.6.4) --- http://demo.wikkawiki.org/SandBox/edit
- **with partial actions support** (Wikkawiki Trunk) --- http://www.boro.fr/demo_wikkaedit/2007-11-27-trunk/wikka.php?wakka=HomePage/edit
===Changes for the user===
- support for actions
- editor height follow window height
- additionnal buttons
- new search & replace window
- indent / un-ident now use Tab key instead of ctrl+I / ctrl+U => bad idea?
- shortcuts for heading (ctrl+1...5) have not been integrated => useful?
- shortcuts for bulleted/numbered item have not been integrated => useful?
- shortcuts for links item have not been integrated => useful?
===Shortcuts===
- #%ctrl#% + #%B#% : bold
- #%ctrl#% + #%I#% : italic
- #%ctrl#% + #%U#% : underline
- #%ctrl#% + #%shift#% + #%S#% : strike
- #%ctrl#% + #%F#% : open search & replace dialog
- #%ctrl#% + #%Z#% : undo
- #%tab#% : indent
- #%shift#% + #%tab#% : outdent
- #%escape#% : leave focus
===Known bugs===
**Common :**
- undo (ctrl+Z) sometimes select the whole textarea instead of the changed characters (already present in WikiEdit) : [[http://wush.net/trac/wikka/ticket/593 | Ticket #593]]
**Gecko browsers :**
//no specific bug//
**Konqueror :**
- shortcuts don't work (except "tab" key)
- click on the "list" button, hit 2 times backspace (to remove "- ") and press a key => browser crash!!!
**Opera :**
- the textarea is not scrolled automatically to follow selection
- shortcuts can't block default browser behaviour, so Ctrl+F display the browser "Find" window => workaround : I disabled shortcuts
**Safari :**
- Ctrl+F display the browser "Find" window
===Installation===
__Note:__ WikkaEdit is already the default editor for the [[http://wush.net/websvn/wikka/listing.php?repname=wikka&path=%2Fbranches%2F1.1.6.4%2F | WikkaWiki 1.1.6.4 branch]] and [[http://wush.net/websvn/wikka/listing.php?repname=wikka&path=%2Ftrunk%2F | WikkaWiki Trunk]]
- grab the source code
With your browser : https://wush.net/svn/wikkacase/wikkaedit/
With SVN :
%%svn checkout https://wush.net/svn/wikkacase/wikkaedit/trunk wikkaedit_trunk%%
- in handlers/edit.php (1.1.6.x) or handlers/edit/edit.php (trunk)
Replace these lines :
%%(php)
$output .= '<script type="text/javascript" src="'.$this->StaticHref('3rdparty/plugins/wikiedit/protoedit.js').'"></script>'."\n".
'<script type="text/javascript" src="'.$this->StaticHref('3rdparty/plugins/wikiedit/wikiedit2.js').'"></script>'."\n";
$output .= '<script type="text/javascript">'." wE = new WikiEdit(); wE.init('body','WikiEdit','editornamecss');".'</script>'."\n";
%%
with
%%(php)
$output .= '<script type="text/javascript" src="3rdparty/plugins/wikkaedit/wikkaedit_data.js"></script>'."\n";
$output .= '<script type="text/javascript" src="3rdparty/plugins/wikkaedit/wikkaedit_search.js"></script>'."\n";
$output .= '<script type="text/javascript" src="3rdparty/plugins/wikkaedit/wikkaedit_actions.js"></script>'."\n";
$output .= '<script type="text/javascript" src="3rdparty/plugins/wikkaedit/wikkaedit.js"></script>'."\n";
%%
__Note__ : wikkaedit_search.js (search&replace) and wikkaedit_actions.js (additionnal toolbar and contextual help) are optionnal. Just remove or comment the related line to disable it.
===TODO===
- (tiny) table creation wizard
- "replace all" should stop after one turn
- autoindent should detect alphanumeric chars and display the next one : 1) 2)...
===Suggestions===
- drop down menu for different kinds of ordered lists (instead of 3 buttons)
- define actions where the users should select some text before clicking a button. For example: for the color action, the users may first select a word, and when s/he clicks the colored text button: the selected word will be inserted inside the text=" " parameter. Such actions may have a slightly different background-color: so the user knows that they act on selected text.
- an 'undo' button (to undo the last change) would be nice.
===Changelog===
**check SVN for detailed changelog**
**2008-01-30** :
- Fix an infinite loop when searching for whole words
- Fix a bug with keyboard shortcuts
**2008-01-28** :
- Selection is not lost anymore when indenting
- Split addToLine() into addToLine() and indent()
- Use ""{{table}}"" syntax instead of table
- Add new function getSelectionContent()
- Add new function setTextAreaContent()
- Add new class SelRange instead of {start:x, end:y}
- Remove unused function setAreaConcent()
- Remove unused function getSelection()
- Fix a bug in addToLine() related to selection when more than 1 line is selected
- Remove strange loop in js_countTextAreaChars()
- Some cosmetic changes
**2007-11-21** :
- WikkaEdit is the default editor for Wikkawiki Trunk
**2007-11-14** :
- WikkaEdit is the default editor for Wikkawiki 1.1.6.4 branch
**2007-07-03** :
- prefixed some variable names with "_" to prevent conflicts
- replaced the word "popup" with "submenu" (the first one is sometimes blocked by popup blockers)
- "formatting rules" link was using an absolute path
- disable "Ctrl+F" for safari
- disable shortcuts for opera
- fix a bug for addToLine() when the cursor is on the textarea start
**2007-06-30** :
- better log console (fixed position and reverse log order)
- new search & replace (redeveloped from scratch)
- new variables for modules (search&replace, actions) and browser detection
- the find button only appears when the search&replace module is enabled
- add shortcut_summary and formatting_guide buttons and related code
- fix shortcuts for indent / unindent
- add escape shortcut to leave textarea (useful for keyboard navigation)
- previously addToSelection() was selected the whole modified text, now it select a bit lesser
- the small delay required by khtml for setSelectionRange was enable for every browser
- add some comments
**2007-05-23** :
- fix lots of bugs on konqueror introduced by the additional setTimeout() in setSelectionRange()
- move contectual help related code to wikkaedit_actions.js
- add some comments
- better autoindent behaviour
- actions (indent, text style...) should not move scrollbar to top anymore
**2007-03-22** : fix a bug with opera
**2007-03-21** : added tooltips for help
**2007-03-14** : added actions and a new contextual help
**2007-02-21** : added "center", "comment", "image", "raw html", "sourcecode" buttons
~~and a submenu containing "monospace", "left float", "right float" and "key"
**2007-02-14** : DotMG released a patch to add autoindent, just commited
**2007-02-12** : initial revision
>>==See also==
~-[[Docs:WikkaEdit | WikkaEdit documentation]]
~-[[Docs:WhatsNew | What's new in the latest release of WikkaWiki]]
>>[[Docs:WikkaEdit | WikkaEdit]] is a new editor toolbar designed by OlivierBorowski to replace WikiEdit ([[http://wackowiki.com/WikiEdit | official website]]). Indeed, WikiEdit is no more actively maintained (latest improvements are from 2004).
[[Docs:WikkaEdit | WikkaEdit]] comes in two flavours, a //simple version// featuring a more streamlined and user/friendly interface than WikiEdit and an //advanced version// with built-in action support. The simple version is included with the [[Docs:WhatsNew1164 | 1.1.6.4 release]], while a first proof-of-concept of the advanced version is available in [[WikkaUnstable | trunk]] and will be included with the [[http://wush.net/trac/wikka/milestone/1.1.7 | 1.1.7 release]].
===Demo server===
- **simple version** (Wikkawiki 1.1.6.4) --- http://demo.wikkawiki.org/SandBox/edit
- **with partial actions support** (Wikkawiki Trunk) --- http://www.boro.fr/demo_wikkaedit/2007-11-27-trunk/wikka.php?wakka=HomePage/edit
===Changes for the user===
- support for actions
- editor height follow window height
- additionnal buttons
- new search & replace window
- indent / un-ident now use Tab key instead of ctrl+I / ctrl+U => bad idea?
- shortcuts for heading (ctrl+1...5) have not been integrated => useful?
- shortcuts for bulleted/numbered item have not been integrated => useful?
- shortcuts for links item have not been integrated => useful?
===Shortcuts===
- #%ctrl#% + #%B#% : bold
- #%ctrl#% + #%I#% : italic
- #%ctrl#% + #%U#% : underline
- #%ctrl#% + #%shift#% + #%S#% : strike
- #%ctrl#% + #%F#% : open search & replace dialog
- #%ctrl#% + #%Z#% : undo
- #%tab#% : indent
- #%shift#% + #%tab#% : outdent
- #%escape#% : leave focus
===Known bugs===
**Common :**
- undo (ctrl+Z) sometimes select the whole textarea instead of the changed characters (already present in WikiEdit) : [[http://wush.net/trac/wikka/ticket/593 | Ticket #593]]
**Gecko browsers :**
//no specific bug//
**Konqueror :**
- shortcuts don't work (except "tab" key)
- click on the "list" button, hit 2 times backspace (to remove "- ") and press a key => browser crash!!!
**Opera :**
- the textarea is not scrolled automatically to follow selection
- shortcuts can't block default browser behaviour, so Ctrl+F display the browser "Find" window => workaround : I disabled shortcuts
**Safari :**
- Ctrl+F display the browser "Find" window
===Installation===
__Note:__ WikkaEdit is already the default editor for the [[http://wush.net/websvn/wikka/listing.php?repname=wikka&path=%2Fbranches%2F1.1.6.4%2F | WikkaWiki 1.1.6.4 branch]] and [[http://wush.net/websvn/wikka/listing.php?repname=wikka&path=%2Ftrunk%2F | WikkaWiki Trunk]]
- grab the source code
With your browser : https://wush.net/svn/wikkacase/wikkaedit/
With SVN :
%%svn checkout https://wush.net/svn/wikkacase/wikkaedit/trunk wikkaedit_trunk%%
- in handlers/edit.php (1.1.6.x) or handlers/edit/edit.php (trunk)
Replace these lines :
%%(php)
$output .= '<script type="text/javascript" src="'.$this->StaticHref('3rdparty/plugins/wikiedit/protoedit.js').'"></script>'."\n".
'<script type="text/javascript" src="'.$this->StaticHref('3rdparty/plugins/wikiedit/wikiedit2.js').'"></script>'."\n";
$output .= '<script type="text/javascript">'." wE = new WikiEdit(); wE.init('body','WikiEdit','editornamecss');".'</script>'."\n";
%%
with
%%(php)
$output .= '<script type="text/javascript" src="3rdparty/plugins/wikkaedit/wikkaedit_data.js"></script>'."\n";
$output .= '<script type="text/javascript" src="3rdparty/plugins/wikkaedit/wikkaedit_search.js"></script>'."\n";
$output .= '<script type="text/javascript" src="3rdparty/plugins/wikkaedit/wikkaedit_actions.js"></script>'."\n";
$output .= '<script type="text/javascript" src="3rdparty/plugins/wikkaedit/wikkaedit.js"></script>'."\n";
%%
__Note__ : wikkaedit_search.js (search&replace) and wikkaedit_actions.js (additionnal toolbar and contextual help) are optionnal. Just remove or comment the related line to disable it.
===TODO===
- (tiny) table creation wizard
- "replace all" should stop after one turn
- autoindent should detect alphanumeric chars and display the next one : 1) 2)...
===Suggestions===
- drop down menu for different kinds of ordered lists (instead of 3 buttons)
- define actions where the users should select some text before clicking a button. For example: for the color action, the users may first select a word, and when s/he clicks the colored text button: the selected word will be inserted inside the text=" " parameter. Such actions may have a slightly different background-color: so the user knows that they act on selected text.
- an 'undo' button (to undo the last change) would be nice.
===Changelog===
**check SVN for detailed changelog**
**2008-01-30** :
- Fix an infinite loop when searching for whole words
- Fix a bug with keyboard shortcuts
**2008-01-28** :
- Selection is not lost anymore when indenting
- Split addToLine() into addToLine() and indent()
- Use ""{{table}}"" syntax instead of table
- Add new function getSelectionContent()
- Add new function setTextAreaContent()
- Add new class SelRange instead of {start:x, end:y}
- Remove unused function setAreaConcent()
- Remove unused function getSelection()
- Fix a bug in addToLine() related to selection when more than 1 line is selected
- Remove strange loop in js_countTextAreaChars()
- Some cosmetic changes
**2007-11-21** :
- WikkaEdit is the default editor for Wikkawiki Trunk
**2007-11-14** :
- WikkaEdit is the default editor for Wikkawiki 1.1.6.4 branch
**2007-07-03** :
- prefixed some variable names with "_" to prevent conflicts
- replaced the word "popup" with "submenu" (the first one is sometimes blocked by popup blockers)
- "formatting rules" link was using an absolute path
- disable "Ctrl+F" for safari
- disable shortcuts for opera
- fix a bug for addToLine() when the cursor is on the textarea start
**2007-06-30** :
- better log console (fixed position and reverse log order)
- new search & replace (redeveloped from scratch)
- new variables for modules (search&replace, actions) and browser detection
- the find button only appears when the search&replace module is enabled
- add shortcut_summary and formatting_guide buttons and related code
- fix shortcuts for indent / unindent
- add escape shortcut to leave textarea (useful for keyboard navigation)
- previously addToSelection() was selected the whole modified text, now it select a bit lesser
- the small delay required by khtml for setSelectionRange was enable for every browser
- add some comments
**2007-05-23** :
- fix lots of bugs on konqueror introduced by the additional setTimeout() in setSelectionRange()
- move contectual help related code to wikkaedit_actions.js
- add some comments
- better autoindent behaviour
- actions (indent, text style...) should not move scrollbar to top anymore
**2007-03-22** : fix a bug with opera
**2007-03-21** : added tooltips for help
**2007-03-14** : added actions and a new contextual help
**2007-02-21** : added "center", "comment", "image", "raw html", "sourcecode" buttons
~~and a submenu containing "monospace", "left float", "right float" and "key"
**2007-02-14** : DotMG released a patch to add autoindent, just commited
**2007-02-12** : initial revision