create new tag
, view all tags


Frequently Asked Questions of the TinyMCEPlugin integration.

Q: I want the old buttons (Edit and WYSIWYG) in 4.1.x to work the same as they used to. How?

A: On 4.2.0, see TWikiRawEditDefault04x02. However if you are using 4.1.2 or earlier, you need to modify your skin templates. These instructions are for Pattern skin (the default).
  1. Edit templates/viewtopicactionbuttons.pattern.tmpl
  2. Find the line that starts %TMPL:DEF{"create_topic_link"}%. This is the template that defines the "Create Topic" link.
  3. Change ?t=%GMTIME to ?nowysiwyg=1;t=%GMTIME in this line
  4. Repeat for the %TMPL:DEF{"edit_topic_link"}% template
  5. Find the line that starts %TMPL:DEF{"edit_wysiwyg_link"}%. This is the line that defines the WYSIWYG command.
  6. Remove cover=%COMPOSER%& from this line (don't forget the &)
  7. Repeat for the %TMPL:DEF{"wysiwyg_create_topic_link"}% template
  8. Save the file and quit the editor
Other skins work in similar ways.

Q: The editor takes over the standard edit screen. That's OK, but how do I get access to the old (textarea) editor?

A: TWiki 4.2.0 has a 'Raw Edit' link on most screens that gives you access to the plain text editor, so this question is moot. However if you are using 4.1.2 or earlier, there are three ways to temporarily disable TinyMCE:
  1. Add=;nowysiwyg=1= to the end of the edit URL to disable it for a single edit,
  2. Set TINYMCEPLUGIN_DISABLE in a web, topic, or personal preferences page to disable the editor for a web, topic or user,
  3. Set WYSIWYG_EXCLUDE as described in WysiwygPlugin to disable the editor subject to certain content (e.g. TWiki variables, pure Code.HTML etc) being in the page. This can also be set on a web, topic, or personal basis.

If you want a more permanent solution, see making Edit and WYSWIYG buttons work

Q: How do I set a TWiki variable inside TinyMCE?

  1. Create a list item using the toolbar button
  2. In the list item, type Set NAME = value
  3. (Optional) Select the value, and format it using Protect on save format.
Step 3 is required if the value contains any TML, or if you style it e.g. to add bold, or if it's sensitive to the correct number of spaces.

Q: How can I protect content from TinyMCE?

  1. Select the content and select the "Protect forever" format. This will add <sticky>..</sticky> tags around the content, which don't interfere with display but do prevent WYSIWYG editors from trying to interpret the content as HTML.

Q: How do I use a TWiki Variable inside TinyMCE?

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 variable parameters is sensitive to spacing, then select the entire TWiki variable and assign the Protect on save style to it.

Q: Why doesn't copy-paste work on Internet Explorer?

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 TWiki site to the list of Tools->Security->Trusted Sites.

Q: Why do all my popups contain raw HTML?

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/TWiki/TinyMCEPlugin directory that contains the line AddType text/html .htm

Q: I write TWiki applications. What is safe to edit?

A: It's impossible to be 100% certain that the use of a WYSIWYG editor will not change existing content such that TWiki 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 TWiki 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.

Unfortunately there is no simple way to describe what will, and what won't, work with WYSIWYG. The best tactic is to use the <sticky> tag to protect such content (this tag is automatically applied by the "Protect forever" format).

-- Contributors: CrawfordCurrie


Does TinyMCE support Simplified Chinese? I just upgraded my TWiki to 4.2.0, and every TWiki pages in the TinyMCE edit become some encoded text instead of Chinese.

-- WangLaowu - 25 Jan 2008

We have lacked people from China helping with development and testing 4.2.0. When you are a European or American your browser just shows ?-marks in Chinese and we have no chance to enter characters and know if it works. We have been begging for Chinese people to help with the project development but without much luck. Are you perhaps a candidate?

-- KennethLavrsen - 25 Jan 2008

I can be that candidate. I've commented in TinyMCEPluginDev and also have seen item5314.

I have a site utilizing traditional chinese, and korean. I have another site attempting to utilize it in japanese. The CJK support is much better since 4.1.1 where it was totally hosed from a default installation standpoint.

Item5314 captures the problem pretty succinctly - Hitting "Edit Twiki Markup" in the WYSIWYG effectively destroys wide byte encoding into single disparate bytes.

-- TimothyChen - 15 Feb 2008

Is the php spellchecker available from TinyMce tested other than iespell? Any alternatives that work for 4.2.0 on most browsers?

-- JohannDizon - 15 May 2008

International character sets should all work now. Please report any problems in the Bugs:WebHome tracker

-- CrawfordCurrie - 17 Jun 2008

Is there no 'preview' button available with this editor ? I can see that preview plug-in is present, but don't know how to enable preview with TinyMCE in TWiki. Any help ?

-- VirendraSingh - 02 Feb 2009

I believe it has been turned off on purpose because you get WYSIWYG while editing and because there is a potential data loss issue with certain browsers if preview is enabled. (Please ask support questions in the Support web.)

-- PeterThoeny - 03 Feb 2009

Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r13 - 2009-02-03 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.