README-SmartEditContrib.txt
author Colas Nahaboo <colas@nahaboo.net>
Tue, 14 Apr 2009 00:57:49 +0200
changeset 7 39908cff6bb5
parent 4 2010c4eb8927
child 11 d4ded5771ee4
permissions -rw-r--r--
typos
     1 #################### QUICK INSTALL
     2 
     3 Copy the contents to your Foswiki install dir:
     4   cp -a data  pub  templates lib YOUR_WIKI_DIR
     5 
     6 To set the SmartEditorAddOn on all webs, go to your Main.SitePreferences 
     7 and set new skin as follows :
     8    * Set SKIN = smarteditor, pattern
     9    
    10 You will want also to add to this topic:
    11 
    12 ---++ Smartedit
    13    * Set SMARTEDITSTRINGSITE = <tselement><tsname>Today's Date</tsname><tsstring>%GMTIME{$year-$mo-$day}%</tsstring></tselement><tselement><tsname>User name</tsname><tsstring>%WIKIUSERNAME%</tsstring></tselement><tselement><tsname>Signature</tsname><tsstring>--&nbsp;%WIKIUSERNAME% - %DATE%</tsstring></tselement><tselement><tsname>Comments, signed and dated, added at top</tsname><tsstring>%<nop>COMMENT{type='top'}%</tsstring></tselement><tselement><tsname>Comments, signed and dated, added at end</tsname><tsstring>%<nop>COMMENT{type='bottom'}%</tsstring></tselement><tselement><tsname>Comments, signed and dated, added immediately before</tsname><tsstring>%<nop>COMMENT{type='above'}%</tsstring></tselement><tselement><tsname>Bullet item added immediately before</tsname><tsstring>%<nop>COMMENT{type='bulletabove'}%</tsstring></tselement><tselement><tsname>Wiki thread mode comment, signed and dated</tsname><tsstring>%<nop>COMMENT{type='threadmode'}%</tsstring></tselement><tselement><tsname>Comments, signed and dated, added recurse after comment box</tsname><tsstring>%<nop>COMMENT{type='belowthreadmode'}%</tsstring></tselement><tselement><tsname>Comments, signed and dated, added immediately below</tsname><tsstring>%<nop>COMMENT{type='below'}%</tsstring></tselement><tselement><tsname>Comments, signed and dated, added at top of table below</tsname><tsstring>%<nop>COMMENT{type='tableprepend'}%</tsstring></tselement><tselement><tsname>Comments, signed and dated, added at end of table above</tsname><tsstring>%<nop>COMMENT{type='tableappend'}%</tsstring></tselement><tselement><tsname>Add before the comment box, after the last comment</tsname><tsstring>%<nop>COMMENT{type='after'}%</tsstring></tselement><tselement><tsname>Action of Action Tracker added to action table directly above</tsname><tsstring>%<nop>COMMENT{type='action'}%</tsstring></tselement><tselement><tsname>Tablerows adding on end</tsname><tsstring>%<nop>COMMENT{type='table'}%</tsstring></tselement><tselement><tsname>Talk using TOC adding on end</tsname><tsstring>%<nop>COMMENT{type='toctalk'}%</tsstring></tselement><tselement><tsname>Create a list of annotated bookmarks</tsname><tsstring>%<nop>COMMENT{type='bookmark'}%</tsstring></tselement><tselement><tsname>Post to a different topic and return to here</tsname><tsstring>%<nop>COMMENT{type='return'}%</tsstring></tselement>
    14    * Set SMARTEDITSTRINGWEB = 
    15    * Set SMARTEDITSTRINGUSERS =
    16    
    17    * Set SMARTEDITICONSITE = <tselement><tsname> %ICON{info}%</tsname><tsstring>%<nop>ICON{info}%</tsstring></tselement><tselement><tsname> %ICON{more}%</tsname><tsstring>%<nop>ICON{more}%</tsstring></tselement><tselement><tsname> %ICON{note}%</tsname><tsstring>%<nop>ICON{note}%</tsstring></tselement><tselement><tsname> %ICON{pencil}%</tsname><tsstring>%<nop>ICON{pencil}%</tsstring></tselement><tselement><tsname> %ICON{question}%</tsname><tsstring>%<nop>ICON{question}%</tsstring></tselement><tselement><tsname> %ICON{stargold}%</tsname><tsstring>%<nop>ICON{stargold}%</tsstring></tselement><tselement><tsname> %ICON{starred}%</tsname><tsstring>%<nop>ICON{starred}%</tsstring></tselement><tselement><tsname> %ICON{stop}%</tsname><tsstring>%<nop>ICON{stop}%</tsstring></tselement><tselement><tsname> %ICON{target}%</tsname><tsstring>%<nop>ICON{target}%</tsstring></tselement><tselement><tsname> %ICON{tip}%</tsname><tsstring>%<nop>ICON{tip}%</tsstring></tselement><tselement><tsname> %ICON{warning}%</tsname><tsstring>%<nop>ICON{warning}%</tsstring></tselement><tselement><tsname> %ICON{wip}%</tsname><tsstring>%<nop>ICON{wip}%</tsstring></tselement><tselement><tsname> %ICON{watch}%</tsname><tsstring>%<nop>ICON{watch}%</tsstring></tselement><tselement><tsname> %ICON{wrench}%</tsname><tsstring>%<nop>ICON{wrench}%</tsstring></tselement><tselement><tsname> %ICON{person}%</tsname><tsstring>%<nop>ICON{person}%</tsstring></tselement><tselement><tsname> %ICON{group}%</tsname><tsstring>%<nop>ICON{group}%</tsstring></tselement><tselement><tsname> %ICON{key}%</tsname><tsstring>%<nop>ICON{key}%</tsstring></tselement><tselement><tsname> %ICON{lock}%</tsname><tsstring>%<nop>ICON{lock}%</tsstring></tselement><tselement><tsname> %ICON{new}%</tsname><tsstring>%<nop>ICON{new}%</tsstring></tselement><tselement><tsname> %ICON{todo}%</tsname><tsstring>%<nop>ICON{todo}%</tsstring></tselement><tselement><tsname> %ICON{updated}%</tsname><tsstring>%<nop>ICON{updated}%</tsstring></tselement><tselement><tsname> %ICON{done}%</tsname><tsstring>%<nop>ICON{done}%</tsstring></tselement><tselement><tsname> %ICON{closed}%</tsname><tsstring>%<nop>ICON{closed}%</tsstring></tselement><tselement><tsname> %ICON{choice-yes}%</tsname><tsstring>%<nop>ICON{choice-yes}%</tsstring></tselement><tselement><tsname> %ICON{choice-no}%</tsname><tsstring>%<nop>ICON{choice-no}%</tsstring></tselement><tselement><tsname> %ICON{choice-cancel}%</tsname><tsstring>%<nop>ICON{choice-cancel}%</tsstring></tselement><tselement><tsname> %ICON{minus}%</tsname><tsstring>%<nop>ICON{minus}%</tsstring></tselement><tselement><tsname> %ICON{plus}%</tsname><tsstring>%<nop>ICON{plus}%</tsstring></tselement><tselement><tsname> %ICON{home}%</tsname><tsstring>%<nop>ICON{home}%</tsstring></tselement><tselement><tsname> %ICON{left}%</tsname><tsstring>%<nop>ICON{left}%</tsstring></tselement><tselement><tsname> %ICON{right}%</tsname><tsstring>%<nop>ICON{right}%</tsstring></tselement><tselement><tsname> %ICON{up}%</tsname><tsstring>%<nop>ICON{up}%</tsstring></tselement><tselement><tsname> %ICON{down}%</tsname><tsstring>%<nop>ICON{down}%</tsstring></tselement>
    18    * Set SMARTEDITICONWEB =
    19    * Set SMARTEDITICONUSER =
    20 
    21 
    22 #################### FULL DOCUMENTATION
    23 
    24 Then follow SmartEditContrib documentation on your wiki in System.SmartEditContrib
    25 
    26 Acknowledgements:
    27    * To Martin Rothbaum for the SmartEditAddon_alt-tab.patch
    28 
    29 #################### TO ADAPT TO OTHER SKINS THAN PATTERN-BASED ONES
    30 
    31 For the view & preview template:
    32 -------------------------------
    33 
    34 // Add in the header:
    35 
    36 <link rel="stylesheet" type="text/css" href="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/wikismartstyle.css"/>
    37 
    38 
    39 For the edit template:
    40 ----------------------
    41 
    42 // Add the javascript in the header: (the last line is the same as view)
    43 
    44 <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/mochikit/lib/MochiKit/MochiKit.js"></script>
    45 <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/wikismartEngine.js"></script>
    46 <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/wikismartActions.js"></script>
    47 <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/smartEditUI.js"></script>
    48 <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/wikismartEvents.js"></script>
    49 <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/smartEditAutoCompletion.js"></script>
    50 <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/smartEditDynamicDivision.js"></script>
    51 <link rel="stylesheet" type="text/css" href="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/wikismartstyle.css"/>
    52 
    53 // Add this just before the main <form:
    54 
    55 <div id="smartEditorTopToolbarID"></div>
    56 
    57 // Add id="topic" to the <textarea if not already there
    58 
    59 // Add this anywhere after the textarea
    60 
    61 <script type="text/javascript">
    62 // The script URL - with / at the end
    63 wikismartScriptURL = '%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/';   
    64 wikismartWikiHomeURL = '%SCRIPTURL%/view'; 
    65 wikismartWikiSkin = '%SKIN%';
    66 // Load all specific preferences
    67 wikismartSitePreferences = ""+"%SMARTEDITSTRINGSITE%";
    68 wikismartWebPreferences = ""+"%SMARTEDITSTRINGWEB%";
    69 wikismartCustomerPreferences = ""+"%SMARTEDITSTRINGUSERS%";
    70 // 3 following lines to add if you have an old smartedit addon installation
    71 wikismartFoswikiSiteIcons = ''+'%SMARTEDITICONSITE%';
    72 wikismartFoswikiWebIcons = ''+'%SMARTEDITICONWEB%';
    73 wikismartFoswikiUserIcons = ''+'%SMARTEDITICONUSER%';
    74 // End of copy
    75 wikismartCurrentWeb = "%WEB%";
    76 wikismartFoswikiIcons = '%SMARTEDITICONS%';
    77 // To know the id of the textarea ... if it is not 'topic'
    78 wikismartEdit('topic');
    79 </script>
    80