~kosova/+junk/tuxfamily-twiki

« back to all changes in this revision

Viewing changes to foswiki/data/System/TinyMCEFrequentlyAskedQuestions.txt

  • Committer: James Michael DuPont
  • Date: 2009-07-18 19:58:49 UTC
  • Revision ID: jamesmikedupont@gmail.com-20090718195849-vgbmaht2ys791uo2
added foswiki

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%META:TOPICINFO{author="ProjectContributor" date="1227770072" format="1.1" version="1.1"}%
 
2
---++!! !TinyMCE FAQs
 
3
 
 
4
Frequently Asked Questions of the TinyMCEPlugin integration.
 
5
 
 
6
%TOC%
 
7
 
 
8
#FixingTheButtons
 
9
---++ Q: I want the old buttons (Edit and !WYSIWYG) in 4.1.x to work the same as they used to. How?
 
10
A: See Foswiki:Support.FaqHowToMakeRawEditDefault. If you need to modify your own skin templates for a customized Pattern skin these instructions should help you.
 
11
   1 Edit =templates/viewtopicactionbuttons.pattern.tmpl=
 
12
   1 Find the line that starts =%<nop>TMPL:DEF{"create_topic_link"}%=. This is the template that defines the "Create Topic" link.
 
13
   1 Change =?t=%<nop>GMTIME= to =?nowysiwyg=1;t=%<nop>GMTIME= in this line
 
14
   1 Repeat for the =%<nop>TMPL:DEF{"edit_topic_link"}%= template
 
15
   1 Find the line that starts =%<nop>TMPL:DEF{"edit_wysiwyg_link"}%=. This is the line that defines the WYSIWYG command.
 
16
   1 Remove =cover=%<nop>COMPOSER%&amp;= from this line (don't forget the &amp;)
 
17
   1 Repeat for the =%<nop>TMPL:DEF{"wysiwyg_create_topic_link"}%= template
 
18
   1 Save the file and quit the editor
 
19
Other skins work in similar ways.
 
20
 
 
21
---++ Q: The editor takes over the standard edit screen. That's OK, but how do I get access to the old (textarea) editor?
 
22
A: Foswiki has a 'Raw Edit' link on most screens that gives you access to the plain text editor, so this question is moot. In addition to this there are three ways to temporarily disable !TinyMCE:
 
23
   1 Add=;nowysiwyg=1= to the end of the edit URL to disable it for a single edit,
 
24
   2 =Set TINYMCEPLUGIN_DISABLE= in a web, topic, or personal preferences page to disable the editor for a web, topic or user,
 
25
   3 =Set WYSIWYG_EXCLUDE= as described in WysiwygPlugin to disable the editor subject to certain content (e.g. Foswiki macros, pure Code.HTML etc) being in the page. This can also be set on a web, topic, or personal basis.
 
26
 
 
27
If you want a more permanent solution, see [[#FixingTheButtons][making Edit and !WYSWIYG buttons work]]
 
28
 
 
29
 
 
30
---++ Q: How do I *set* a Foswiki macro inside !TinyMCE?
 
31
A:
 
32
   1 Create a list item using the toolbar button
 
33
   1 In the list item, type Set NAME = value
 
34
   1 (Optional) Select the value, and format it using =Protect on save= format.
 
35
Step 3 is required if the value contains TML (The special Foswiki syntax called Topic Markup Language), or if you style it e.g. to add bold, or if it's sensitive to the correct number of spaces.
 
36
 
 
37
---++ Q: How can I *protect* content from !TinyMCE?
 
38
A:
 
39
   1 Select the content and select the "Protect forever" format. This will add &lt;sticky>..&lt;/sticky> tags around the content, which don't interfere with display but do prevent WYSIWYG editors from trying to interpret the content as HTML.
 
40
 
 
41
---++ Q: How do I *use* a Foswiki macro inside !TinyMCE?
 
42
A: Just type it in. When the topic is saved, what you type will be saved just as you wrote it. If any part of your macro parameters is sensitive to spacing, then select the entire Foswiki macro and assign the ==Protect on save== style to it.
 
43
 
 
44
---++ Q: Why doesn't copy-paste work on Internet Explorer?
 
45
A: It does, but you have probably got your security settings in IE set up to disable it. In IE got to Tools->Security->Internet->Custom Level->Allow paste operations via script. If this is set to 'Disable', then all internet applications are blocked from pasting using Javascript. Either enable this option, or add your Foswiki site to the list of Tools->Security->Trusted Sites.
 
46
 
 
47
---++ Q: Why do all my popups contain raw HTML?
 
48
A: You probably have your file extensions set up in Apache so that =.htm= files are treated as plain text. Look through your Apache config (including =.htaccess= for the =pub= directory) for a line that says something like: =AddType text/plain .htm= (probably with a bunch of other extensions). You can either remove =.htm= from that list, or you can add a .htaccess for the pub/System/TinyMCEPlugin directory that contains the line =AddType text/html .htm=
 
49
 
 
50
---++ Q: I write Foswiki applications. What is safe to edit?
 
51
A: It's impossible to be 100% certain that the use of a WYSIWYG editor will not change existing content such that Foswiki Applications no longer work. The !WysiwygPlugin is set up by default to make it as easy as possible to create new content and import content from other applications. However some Foswiki applications are written such a way that they "just work" - they take silent advantage of the sloppy parser used in TML rendering. Sloppy syntax can break the rules that WYSWYG relies on to be able to interpret TML and present it for editing.
 
52
 
 
53
Unfortunately there is no simple way to describe what will, and what won't, work with WYSIWYG. The best tactic is to use the &lt;sticky&gt; tag to protect such content (this tag is automatically applied by the "Protect forever" format).
 
54