README-SmartEditContrib.txt
author Colas Nahaboo <colas@nahaboo.net>
Wed, 15 Apr 2009 23:44:37 +0200
changeset 18 2ef558cae438
parent 17 834a42b5102c
permissions -rw-r--r--
lib/Foswiki/Contrib/SmartEditContrib/MANIFEST updated
     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 = \
    14      <tselement><tsname>Today's Date</tsname><tsstring>%GMTIME{$year-$mo-$day}%</tsstring></tselement>\
    15      <tselement><tsname>User name</tsname><tsstring>%WIKIUSERNAME%</tsstring></tselement>\
    16      <tselement><tsname>Signature</tsname><tsstring>--&nbsp;%WIKIUSERNAME% - %DATE%</tsstring></tselement>\
    17      <tselement><tsname>Comments, signed and dated, added at top</tsname><tsstring>%<nop>COMMENT{type='top'}%</tsstring></tselement>\
    18      <tselement><tsname>Comments, signed and dated, added at end</tsname><tsstring>%<nop>COMMENT{type='bottom'}%</tsstring></tselement>\
    19      <tselement><tsname>Comments, signed and dated, added immediately before</tsname><tsstring>%<nop>COMMENT{type='above'}%</tsstring></tselement>\
    20      <tselement><tsname>Bullet item added immediately before</tsname><tsstring>%<nop>COMMENT{type='bulletabove'}%</tsstring></tselement>\
    21      <tselement><tsname>Wiki thread mode comment, signed and dated</tsname><tsstring>%<nop>COMMENT{type='threadmode'}%</tsstring></tselement>\
    22      <tselement><tsname>Comments, signed and dated, added recurse after comment box</tsname><tsstring>%<nop>COMMENT{type='belowthreadmode'}%</tsstring></tselement>\
    23      <tselement><tsname>Comments, signed and dated, added immediately below</tsname><tsstring>%<nop>COMMENT{type='below'}%</tsstring></tselement>\
    24      <tselement><tsname>Comments, signed and dated, added at top of table below</tsname><tsstring>%<nop>COMMENT{type='tableprepend'}%</tsstring></tselement>\
    25      <tselement><tsname>Comments, signed and dated, added at end of table above</tsname><tsstring>%<nop>COMMENT{type='tableappend'}%</tsstring></tselement>\
    26      <tselement><tsname>Add before the comment box, after the last comment</tsname><tsstring>%<nop>COMMENT{type='after'}%</tsstring></tselement>\
    27      <tselement><tsname>Action of Action Tracker added to action table directly above</tsname><tsstring>%<nop>COMMENT{type='action'}%</tsstring></tselement>\
    28      <tselement><tsname>Tablerows adding on end</tsname><tsstring>%<nop>COMMENT{type='table'}%</tsstring></tselement>\
    29      <tselement><tsname>Talk using TOC adding on end</tsname><tsstring>%<nop>COMMENT{type='toctalk'}%</tsstring></tselement>\
    30      <tselement><tsname>Create a list of annotated bookmarks</tsname><tsstring>%<nop>COMMENT{type='bookmark'}%</tsstring></tselement>\
    31      <tselement><tsname>Post to a different topic and return to here</tsname><tsstring>%<nop>COMMENT{type='return'}%</tsstring></tselement>
    32    * Set SMARTEDITSTRINGWEB = 
    33    * Set SMARTEDITSTRINGUSER =
    34    
    35    * Set SMARTEDITICONSITE = \
    36      <tselement><tsname> %ICON{info}% info</tsname><tsstring>%<nop>ICON{info}%</tsstring></tselement>\
    37      <tselement><tsname> %ICON{more}% more</tsname><tsstring>%<nop>ICON{more}%</tsstring></tselement>\
    38      <tselement><tsname> %ICON{note}% note</tsname><tsstring>%<nop>ICON{note}%</tsstring></tselement>\
    39      <tselement><tsname> %ICON{pencil}% pencil</tsname><tsstring>%<nop>ICON{pencil}%</tsstring></tselement>\
    40      <tselement><tsname> %ICON{question}% question</tsname><tsstring>%<nop>ICON{question}%</tsstring></tselement>\
    41      <tselement><tsname> %ICON{stargold}% stargold</tsname><tsstring>%<nop>ICON{stargold}%</tsstring></tselement>\
    42      <tselement><tsname> %ICON{starred}% starred</tsname><tsstring>%<nop>ICON{starred}%</tsstring></tselement>\
    43      <tselement><tsname> %ICON{stop}% stop</tsname><tsstring>%<nop>ICON{stop}%</tsstring></tselement>\
    44      <tselement><tsname> %ICON{target}% target</tsname><tsstring>%<nop>ICON{target}%</tsstring></tselement>\
    45      <tselement><tsname> %ICON{tip}% tip</tsname><tsstring>%<nop>ICON{tip}%</tsstring></tselement>\
    46      <tselement><tsname> %ICON{warning}% warning</tsname><tsstring>%<nop>ICON{warning}%</tsstring></tselement>\
    47      <tselement><tsname> %ICON{wip}% wip</tsname><tsstring>%<nop>ICON{wip}%</tsstring></tselement>\
    48      <tselement><tsname> %ICON{watch}% watch</tsname><tsstring>%<nop>ICON{watch}%</tsstring></tselement>\
    49      <tselement><tsname> %ICON{wrench}% wrench</tsname><tsstring>%<nop>ICON{wrench}%</tsstring></tselement>\
    50      <tselement><tsname> %ICON{person}% person</tsname><tsstring>%<nop>ICON{person}%</tsstring></tselement>\
    51      <tselement><tsname> %ICON{group}% group</tsname><tsstring>%<nop>ICON{group}%</tsstring></tselement>\
    52      <tselement><tsname> %ICON{key}% key</tsname><tsstring>%<nop>ICON{key}%</tsstring></tselement>\
    53      <tselement><tsname> %ICON{lock}% lock</tsname><tsstring>%<nop>ICON{lock}%</tsstring></tselement>\
    54      <tselement><tsname> %ICON{new}% new</tsname><tsstring>%<nop>ICON{new}%</tsstring></tselement>\
    55      <tselement><tsname> %ICON{todo}% todo</tsname><tsstring>%<nop>ICON{todo}%</tsstring></tselement>\
    56      <tselement><tsname> %ICON{updated}% updated</tsname><tsstring>%<nop>ICON{updated}%</tsstring></tselement>\
    57      <tselement><tsname> %ICON{done}% done</tsname><tsstring>%<nop>ICON{done}%</tsstring></tselement>\
    58      <tselement><tsname> %ICON{closed}% closed</tsname><tsstring>%<nop>ICON{closed}%</tsstring></tselement>\
    59      <tselement><tsname> %ICON{choice-yes}% choice-yes</tsname><tsstring>%<nop>ICON{choice-yes}%</tsstring></tselement>\
    60      <tselement><tsname> %ICON{choice-no}% choice-no</tsname><tsstring>%<nop>ICON{choice-no}%</tsstring></tselement>\
    61      <tselement><tsname> %ICON{choice-cancel}% choice-cancel</tsname><tsstring>%<nop>ICON{choice-cancel}%</tsstring></tselement>\
    62      <tselement><tsname> %ICON{minus}% minus</tsname><tsstring>%<nop>ICON{minus}%</tsstring></tselement>\
    63      <tselement><tsname> %ICON{plus}% plus</tsname><tsstring>%<nop>ICON{plus}%</tsstring></tselement>\
    64      <tselement><tsname> %ICON{home}% home</tsname><tsstring>%<nop>ICON{home}%</tsstring></tselement>\
    65      <tselement><tsname> %ICON{left}% left</tsname><tsstring>%<nop>ICON{left}%</tsstring></tselement>\
    66      <tselement><tsname> %ICON{right}% right</tsname><tsstring>%<nop>ICON{right}%</tsstring></tselement>\
    67      <tselement><tsname> %ICON{up}% up</tsname><tsstring>%<nop>ICON{up}%</tsstring></tselement>\
    68      <tselement><tsname> %ICON{down}% down</tsname><tsstring>%<nop>ICON{down}%</tsstring></tselement>
    69    * Set SMARTEDITICONWEB =
    70    * Set SMARTEDITICONUSER =
    71 
    72 
    73 #################### FULL DOCUMENTATION
    74 
    75 Then follow SmartEditContrib documentation on your wiki in System.SmartEditContrib
    76 
    77 Acknowledgements:
    78    * To Martin Rothbaum for the SmartEditAddon_alt-tab.patch
    79 
    80 #################### TO ADAPT TO OTHER SKINS THAN PATTERN-BASED ONES
    81 
    82 For the view & preview template:
    83 -------------------------------
    84 
    85 // Add in the header:
    86 
    87 <link rel="stylesheet" type="text/css" href="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/wikismartstyle.css"/>
    88 
    89 
    90 For the edit template:
    91 ----------------------
    92 
    93 // Add the javascript in the header: (the last line is the same as view)
    94 
    95 <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/mochikit/lib/MochiKit/MochiKit.js"></script>
    96 <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/wikismartEngine.js"></script>
    97 <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/wikismartActions.js"></script>
    98 <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/smartEditUI.js"></script>
    99 <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/wikismartEvents.js"></script>
   100 <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/smartEditAutoCompletion.js"></script>
   101 <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/smartEditDynamicDivision.js"></script>
   102 <link rel="stylesheet" type="text/css" href="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/wikismartstyle.css"/>
   103 
   104 // Add this just before the main <form:
   105 
   106 <div id="smartEditorTopToolbarID"></div>
   107 
   108 // Add id="topic" to the <textarea if not already there
   109 
   110 // Add this anywhere after the textarea
   111 
   112 <script type="text/javascript">
   113 // The script URL - with / at the end
   114 wikismartScriptURL = '%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/';   
   115 wikismartWikiHomeURL = '%SCRIPTURL%/view'; 
   116 wikismartWikiSkin = '%SKIN%';
   117 // Load all specific preferences
   118 wikismartSitePreferences = ""+"%SMARTEDITSTRINGSITE%";
   119 wikismartWebPreferences = ""+"%SMARTEDITSTRINGWEB%";
   120 wikismartCustomerPreferences = ""+"%SMARTEDITSTRINGUSER%";
   121 // 3 following lines to add if you have an old smartedit addon installation
   122 wikismartFoswikiSiteIcons = ""+""%SMARTEDITICONSITE%";
   123 wikismartFoswikiWebIcons = ""+"%SMARTEDITICONWEB%";
   124 wikismartFoswikiUserIcons = ""+'%SMARTEDITICONUSER%";
   125 // End of copy
   126 wikismartCurrentWeb = "%WEB%";
   127 wikismartForce = '%SMARTEDITFORCE%';
   128 // To know the id of the textarea ... if it is not 'topic'
   129 wikismartEdit('topic');
   130 </script>
   131