Skip to content

Commit

Permalink
Item9235: Turns out half-arsed table clean just isn't useful
Browse files Browse the repository at this point in the history
So this is a more complete approach - tries to emulate fully the
WYSIWYGPLUGIN_STICKYBITS functionality in TinyMCE so that we can
detect arbitrary HTML that contains sticky attributes, and also
clean it.

This functionality is tied to tables for now.

TODO: Rename this whole thing to TinyMCEToolsPlugin, because the code
is generic enough now to be applied to any arbitrary TinyMCE selection,
not just tables
TODO: Fix up button UI/logic so that we can apply sticky state/cleaning
to any arbitrary TinyMCE selection
TODO: Commit tablecopy code (copy selected table to clipboard as tab-delim
data)

git-svn-id: http://svn.foswiki.org/trunk@8023 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Jul 4, 2010
1 parent 70d2830 commit 51e1161
Showing 1 changed file with 33 additions and 29 deletions.
62 changes: 33 additions & 29 deletions WysiwygPlugin/data/System/WysiwygPluginSettings.txt
Expand Up @@ -47,35 +47,39 @@ HTML.
The default setting for this preference are hard coded in the plugin. If you
wish to change the settings, the following list is the default setting coded
in the plugin:
<verbatim>
* Set WYSIWYGPLUGIN_STICKYBITS = .*=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,style;
DL=compact;
FONT=size,face;
H[0-9]=align;
HR=align,noshade,size,width;
LEGEND=accesskey,align;
LI=value;
OL=compact,start,type;
P=align;
PARAM=name,type,value,valuetype;
PRE=width;
Q=cite;
TABLE=align,bgcolor,frame,rules,summary,width;
TBODY=align,char,charoff,valign;
TD=abbr,align,axis,bgcolor,char,charoff,headers,height,nowrap,rowspan,scope,valign,width;
TFOOT=align,char,charoff,valign;
TH=abbr,align,axis,bgcolor,char,charoff,height,nowrap,rowspan,scope,valign,width,headers;
THEAD=align,char,charoff,valign;
TR=bgcolor,char,charoff,valign;
UL=compact,type
</verbatim>
<pre class="tml">
* Set WYSIWYGPLUGIN_STICKYBITS = %INCLUDE{"%TOPIC%" section="WYSIWYG_STICKYBITS"}%
</pre>%JQREQUIRE{"chili"}%<!--
%STARTSECTION{"WYSIWYGPLUGIN_STICKYBITS"}%
.*=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,style;
DL=compact;
FONT=size,face;
H[0-9]=align;
HR=align,noshade,size,width;
LEGEND=accesskey,align;
LI=value;
OL=compact,start,type;
P=align;
PARAM=name,type,value,valuetype;
PRE=width;
Q=cite;
TABLE=align,bgcolor,frame,rules,summary,width;
TBODY=align,char,charoff,valign;
TD=abbr,align,axis,bgcolor,char,charoff,headers,height,nowrap,rowspan,scope,valign,width;
TFOOT=align,char,charoff,valign;
TH=abbr,align,axis,bgcolor,char,charoff,height,nowrap,rowspan,scope,valign,width,headers;
THEAD=align,char,charoff,valign;
TR=bgcolor,char,charoff,valign;
UL=compact,type
%ENDSECTION{"WYSIWYGPLUGIN_STICKYBITS"}%
-->

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.

Expand Down

0 comments on commit 51e1161

Please sign in to comment.