1
---+ Settings for WysiwygPlugin that are common to most editor integrations
3
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:
4
* =html= - HTML tags (e.g. =<div>=, not including <br>), or
5
* =macros= - simple macros (e.g. =%<nop>VAR%=) or
6
* =calls= - macros with parameters e.g. =%<nop>MACRO{...}%=
7
* =pre= blocks (=<pre>=)
8
* HTML =comments= (=<!--= ... =-->=)
9
If the plugin detects an excluded construct in the topic, it will refuse to allow the edit and will redirect to the default editor.
11
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=
13
You should set =WYSIWYG_EXCLUDE= and =WYSIWYG_EDITABLE_CALLS= in %USERSWEB%.SitePreferences, or in %WEBPREFSTOPIC% for each web.
15
You can define the global preference =WYSIWYGPLUGIN_STICKYBITS= to stop the
16
plugin from ever trying to convert specific HTML tags into
17
HTML when certain specific attributes are present on the tag. This is most
18
useful when you have styling or alignment information in tags that must be
21
This [[%SYSTEMWEB%.PreferenceSettings][preference setting]] is used to tell the translator which attributes, when present
22
on a tag, make it "stick" i.e. block conversion. For example, setting it to
23
=table=background,lang;tr=valign= will stop the translator from trying to
24
handle any =table= tag that has =background= or =lang= attributes, and any
25
=tr= tag that has a =valign= attribute.
27
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.
29
The default setting for this preference is:
31
.*=id,lang,title,dir,on.*;
32
A=accesskey,coords,shape,target;
35
COL=char,charoff,span,valign,width;
36
COLGROUP=align,char,charoff,span,valign,width;
42
HR=align,noshade,size,width;
43
LEGEND=accesskey,align;
45
OL=compact,start,type;
47
PARAM=name,type,value,valuetype;
50
TABLE=align,bgcolor,border,cellpadding,cellspacing,frame,rules,summary,width;
51
TBODY=align,char,charoff,valign;
52
TD=abbr,align,axis,bgcolor,char,charoff,colspan,headers,height,nowrap,rowspan,scope,valign,width;
53
TFOOT=align,char,charoff,valign;
54
TH=abbr,align,axis,bgcolor,char,charoff,colspan,height,nowrap,rowspan,scope,valign,width,headers;
55
THEAD=align,char,charoff,valign;
56
TR=bgcolor,char,charoff,valign;
60
If you edit using the plain-text editor, you can use the <sticky>..</sticky> tags to delimit HTML (or TML) that you do *not* want to be WYSIWYG edited.
b'\\ No newline at end of file'