Permalink
Browse files

Item2070: Merge new TMCE/Wysiwyg pair over to 1.0.7

Copy over Wysiwyg from trunk


git-svn-id: http://svn.foswiki.org/branches/Release01x00@4921 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information...
KennethLavrsen KennethLavrsen
KennethLavrsen authored and KennethLavrsen committed Sep 14, 2009
1 parent 6b21d8f commit 90481872b94d49abb3e213c500535ef277acc37c
Showing with 8,319 additions and 0 deletions.
  1. +12 −0 WysiwygPlugin/POSTINSTALL
  2. +203 −0 WysiwygPlugin/data/System/WysiwygPlugin.txt
  3. +63 −0 WysiwygPlugin/data/System/WysiwygPluginSettings.txt
  4. +2 −0 WysiwygPlugin/data/System/WysiwygPluginTopicLister.txt
  5. +1,022 −0 WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin.pm
  6. +331 −0 WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/Constants.pm
  7. +3 −0 WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/DEPENDENCIES
  8. +246 −0 WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML.pm
  9. +193 −0 WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/Base.pm
  10. +87 −0 WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/Leaf.pm
  11. +1,604 −0 WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm
  12. +157 −0 WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/WC.pm
  13. +14 −0 WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/MANIFEST
  14. +858 −0 WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/TML2HTML.pm
  15. +18 −0 WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/build.pl
  16. BIN WysiwygPlugin/pub/System/WysiwygPlugin/wikiringlogo20x20.png
  17. +439 −0 WysiwygPlugin/test/unit/WysiwygPlugin/ExtendedTranslatorTests.pm
  18. +2,153 −0 WysiwygPlugin/test/unit/WysiwygPlugin/TranslatorTests.pm
  19. +31 −0 WysiwygPlugin/test/unit/WysiwygPlugin/WysiwygPluginSuite.pm
  20. +327 −0 WysiwygPlugin/test/unit/WysiwygPlugin/WysiwygPluginTests.pm
  21. +4 −0 WysiwygPlugin/test/unit/WysiwygPlugin/result_tml/definitionList.txt
  22. +45 −0 WysiwygPlugin/test/unit/WysiwygPlugin/result_tml/listItem.txt
  23. +20 −0 WysiwygPlugin/test/unit/WysiwygPlugin/result_tml/orderList.txt
  24. +9 −0 WysiwygPlugin/test/unit/WysiwygPlugin/result_tml/paragraph.txt
  25. +13 −0 WysiwygPlugin/test/unit/WysiwygPlugin/result_tml/stylesBold.txt
  26. +19 −0 WysiwygPlugin/test/unit/WysiwygPlugin/result_tml/stylesBoldFixedFont.txt
  27. +27 −0 WysiwygPlugin/test/unit/WysiwygPlugin/result_tml/stylesBoldItalic.txt
  28. +7 −0 WysiwygPlugin/test/unit/WysiwygPlugin/result_tml/stylesFixedFont.txt
  29. +10 −0 WysiwygPlugin/test/unit/WysiwygPlugin/result_tml/stylesItalic.txt
  30. +7 −0 WysiwygPlugin/test/unit/WysiwygPlugin/result_tml/table.txt
  31. +14 −0 WysiwygPlugin/test/unit/WysiwygPlugin/result_tml/titles.txt
  32. +9 −0 WysiwygPlugin/test/unit/WysiwygPlugin/result_tml/verbatim.txt
  33. +19 −0 WysiwygPlugin/test/unit/WysiwygPlugin/test_html/definitionList.html
  34. +88 −0 WysiwygPlugin/test/unit/WysiwygPlugin/test_html/listItem.html
  35. +42 −0 WysiwygPlugin/test/unit/WysiwygPlugin/test_html/orderList.html
  36. +14 −0 WysiwygPlugin/test/unit/WysiwygPlugin/test_html/paragraph.html
  37. +16 −0 WysiwygPlugin/test/unit/WysiwygPlugin/test_html/stylesBold.html
  38. +28 −0 WysiwygPlugin/test/unit/WysiwygPlugin/test_html/stylesBoldFixedFont.html
  39. +41 −0 WysiwygPlugin/test/unit/WysiwygPlugin/test_html/stylesBoldItalic.html
  40. +12 −0 WysiwygPlugin/test/unit/WysiwygPlugin/test_html/stylesFixedFont.html
  41. +15 −0 WysiwygPlugin/test/unit/WysiwygPlugin/test_html/stylesItalic.html
  42. +35 −0 WysiwygPlugin/test/unit/WysiwygPlugin/test_html/table.html
  43. +18 −0 WysiwygPlugin/test/unit/WysiwygPlugin/test_html/titles.html
  44. +11 −0 WysiwygPlugin/test/unit/WysiwygPlugin/test_html/verbatim.html
  45. +18 −0 WysiwygPlugin/tools/html2tml.pl
  46. +15 −0 WysiwygPlugin/tools/tml2html.pl
View
@@ -0,0 +1,12 @@
print <<DONE;
##########################################################
This package includes the Kupu WYSIWYG editor. This is a powerful
cross-browser editor that works in IE and Mozilla-based browsers.
Full installation of Kupu requires that you run the Kupu makefile.
This is not required for Foswiki, but is required if you want a full
installation of Kupu for other reasons. For further details, read
the documentation in the pub/_kupu/doc directory in your installation.
DONE

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,63 @@
%META:TOPICPARENT{name="WysiwygPlugin"}%
---+ Settings for WysiwygPlugin that are common to most editor integrations
%STARTINCLUDE%
The *global* [[%SYSTEMWEB%.PreferenceSettings][preference setting]] =WYSIWYG_EXCLUDE= can be set to make the plugin sensitive to what is in a topic, before allowing it to be edited. You can set it up to veto an edit if the topic contains:
* =html= - HTML tags (e.g. =&lt;div&gt;=, not including &lt;br&gt;), or
* =macros= - simple macros (e.g. =%<nop>VAR%=) or
* =calls= - macros with parameters e.g. =%<nop>MACRO{...}%=
* =pre= blocks (=&lt;pre&gt;=)
* HTML =comments= (=&lt;!--= ... =--&gt;=)
If the plugin detects an excluded construct in the topic, it will refuse to allow the edit and will redirect to the default editor.
If you excluded =calls= in =WYSIWYG_EXCLUDE=, you can still define a subset of macros that do *not* block edits. this is done in the *global* [[%SYSTEMWEB%.PreferenceSettings][preference setting]] =WYSIWYG_EDITABLE_CALLS=, which should be a list of macro names separated by vertical bars, with no spaces, e.g: =* Set WYSIWYG_EDITABLE_CALLS = COMMENT|CALENDAR|INCLUDE=
You should set =WYSIWYG_EXCLUDE= and =WYSIWYG_EDITABLE_CALLS= in %USERSWEB%.SitePreferences, or in %WEBPREFSTOPIC% for each web.
You can define the global preference =WYSIWYGPLUGIN_STICKYBITS= to stop the
plugin from ever trying to convert specific HTML tags into
TML when certain specific attributes are present on the tag. This is most
useful when you have styling or alignment information in tags that must be
preserved.
This [[%SYSTEMWEB%.PreferenceSettings][preference setting]] is used to tell the translator which attributes, when present
on a tag, make it "stick" i.e. block conversion. For example, setting it to
=table=background,lang;tr=valign= will stop the translator from trying to
handle any =table= tag that has =background= or =lang= attributes, and any
=tr= tag that has a =valign= attribute.
You can use perl regular expressions to match tag and attribute names, so =.*=id,on.*= will ensure that any tag with an =on*= event handler is kept as HTML.
The default setting for this preference is:
<verbatim>
.*=id,lang,title,dir,on.*;
A=accesskey,coords,shape,target;
BDO=dir;
BR=clear;
COL=char,charoff,span,valign,width;
COLGROUP=align,char,charoff,span,valign,width;
DIR=compact;
DIV=align;
DL=compact;
FONT=size,face;
H\d=align;
HR=align,noshade,size,width;
LEGEND=accesskey,align;
LI=type,value;
OL=compact,start,type;
P=align;
PARAM=name,type,value,valuetype;
PRE=width;
Q=cite;
TABLE=align,bgcolor,border,cellpadding,cellspacing,frame,rules,summary,width;
TBODY=align,char,charoff,valign;
TD=abbr,align,axis,bgcolor,char,charoff,colspan,headers,height,nowrap,rowspan,scope,valign,width;
TFOOT=align,char,charoff,valign;
TH=abbr,align,axis,bgcolor,char,charoff,colspan,height,nowrap,rowspan,scope,valign,width,headers;
THEAD=align,char,charoff,valign;
TR=bgcolor,char,charoff,valign;
UL=compact,type
</verbatim>
If you edit using the plain-text editor, you can use the &lt;sticky&gt;..&lt;/sticky&gt; tags to delimit HTML (or TML) that you do *not* want to be WYSIWYG edited.
%STOPINCLUDE%
@@ -0,0 +1,2 @@
%META:TOPICPARENT{name="WysiwygPlugin"}%
%TOPICLIST{format="<nop>$name" web="%URLPARAM{web}%"}%
Oops, something went wrong.

0 comments on commit 9048187

Please sign in to comment.