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@0
|
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>-- %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>
|
colas@0
|
14 |
* Set SMARTEDITSTRINGWEB =
|
colas@0
|
15 |
* Set SMARTEDITSTRINGUSERS =
|
colas@0
|
16 |
|
colas@0
|
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>
|
colas@0
|
18 |
* Set SMARTEDITICONWEB =
|
colas@0
|
19 |
* Set SMARTEDITICONUSER =
|
colas@0
|
20 |
|
colas@0
|
21 |
|
colas@0
|
22 |
#################### FULL DOCUMENTATION
|
colas@0
|
23 |
|
colas@4
|
24 |
Then follow SmartEditContrib documentation on your wiki in System.SmartEditContrib
|
colas@0
|
25 |
|
colas@0
|
26 |
Acknowledgements:
|
colas@0
|
27 |
* To Martin Rothbaum for the SmartEditAddon_alt-tab.patch
|
colas@0
|
28 |
|
colas@0
|
29 |
#################### TO ADAPT TO OTHER SKINS THAN PATTERN-BASED ONES
|
colas@0
|
30 |
|
colas@0
|
31 |
For the view & preview template:
|
colas@0
|
32 |
-------------------------------
|
colas@0
|
33 |
|
colas@0
|
34 |
// Add in the header:
|
colas@0
|
35 |
|
colas@4
|
36 |
<link rel="stylesheet" type="text/css" href="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/wikismartstyle.css"/>
|
colas@0
|
37 |
|
colas@0
|
38 |
|
colas@0
|
39 |
For the edit template:
|
colas@0
|
40 |
----------------------
|
colas@0
|
41 |
|
colas@0
|
42 |
// Add the javascript in the header: (the last line is the same as view)
|
colas@0
|
43 |
|
colas@4
|
44 |
<script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/mochikit/lib/MochiKit/MochiKit.js"></script>
|
colas@4
|
45 |
<script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/wikismartEngine.js"></script>
|
colas@4
|
46 |
<script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/wikismartActions.js"></script>
|
colas@4
|
47 |
<script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/smartEditUI.js"></script>
|
colas@4
|
48 |
<script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/wikismartEvents.js"></script>
|
colas@4
|
49 |
<script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/smartEditAutoCompletion.js"></script>
|
colas@4
|
50 |
<script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/smartEditDynamicDivision.js"></script>
|
colas@4
|
51 |
<link rel="stylesheet" type="text/css" href="%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/wikismartstyle.css"/>
|
colas@0
|
52 |
|
colas@0
|
53 |
// Add this just before the main <form:
|
colas@0
|
54 |
|
colas@0
|
55 |
<div id="smartEditorTopToolbarID"></div>
|
colas@0
|
56 |
|
colas@0
|
57 |
// Add id="topic" to the <textarea if not already there
|
colas@0
|
58 |
|
colas@0
|
59 |
// Add this anywhere after the textarea
|
colas@0
|
60 |
|
colas@0
|
61 |
<script type="text/javascript">
|
colas@0
|
62 |
// The script URL - with / at the end
|
colas@4
|
63 |
wikismartScriptURL = '%PUBURLPATH%/%SYSTEMWEB%/SmartEditContrib/';
|
colas@1
|
64 |
wikismartWikiHomeURL = '%SCRIPTURL%/view';
|
colas@1
|
65 |
wikismartWikiSkin = '%SKIN%';
|
colas@0
|
66 |
// Load all specific preferences
|
colas@1
|
67 |
wikismartSitePreferences = ""+"%SMARTEDITSTRINGSITE%";
|
colas@1
|
68 |
wikismartWebPreferences = ""+"%SMARTEDITSTRINGWEB%";
|
colas@1
|
69 |
wikismartCustomerPreferences = ""+"%SMARTEDITSTRINGUSERS%";
|
colas@0
|
70 |
// 3 following lines to add if you have an old smartedit addon installation
|
colas@2
|
71 |
wikismartFoswikiSiteIcons = ''+'%SMARTEDITICONSITE%';
|
colas@2
|
72 |
wikismartFoswikiWebIcons = ''+'%SMARTEDITICONWEB%';
|
colas@2
|
73 |
wikismartFoswikiUserIcons = ''+'%SMARTEDITICONUSER%';
|
colas@0
|
74 |
// End of copy
|
colas@1
|
75 |
wikismartCurrentWeb = "%WEB%";
|
colas@2
|
76 |
wikismartFoswikiIcons = '%SMARTEDITICONS%';
|
colas@0
|
77 |
// To know the id of the textarea ... if it is not 'topic'
|
colas@1
|
78 |
wikismartEdit('topic');
|
colas@0
|
79 |
</script>
|
colas@0
|
80 |
|