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