• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.
Attached is a template that can be used in combination with TMCE.

Changes:

  • adds a button to switch between natedit and TMCE
  • fixes actionkeys for indent, undent etc (these were previously set to "1")
  • updates the tooltips of buttons to include their actionkey

Still some things to iron out though:

  • variable t should be set to a random value, instead of being passed along. For example Math.floor(Math.random()*10000000000);
  • the 'save and continue' that is performed before the switch does not seem to work yet

Files can be downloaded here:


Update

Ok, the code of the previous version was far too complicated. I discovered the world of hidden input fields, and reimplemented the switch between TMCE and natedit. I also added new button graphics and put the css inside a template such that it can be installed without changing any existing skins and files.

Description

This template is for use with TinyMCE in combination with NatEditContrib and adds a button to your toolbar which allows you to switch between the TinyMCE editor and plain-text edit. It is based on the Word template, but can easily be adapted to work with any other custom template.

Button graphics are taken from the directory defined by the NATEDIT_THEME setting. If this variable is not defined, they are taken from the directory 'default'. The switch is achieved by setting the hidden input field 'nowysiwyg', and by performing a 'Save and Continue'. Therefore, on each switch between WYSIWYG and plain-text edit, your topic is saved.

Installation

  • put contents of zip-file in your twiki-root
  • add 'wysiwyg.word.natedit' to your skin settings (i.e. Set SKIN = wysiwyg.word.natedit,word.natedit,nat)
  • the new zip-file can be downloaded here:


Update

See Item5181 for an enhancement that gives the user control over whether to start the editor in WYSIWYG mode or plain-text mode, while keeping the possibility to switch between both editors during editing.


Stale: Setting unmaintained extension to "no action required".

-- PeterThoeny - 2010-10-12

ItemTemplate
Summary functionality to switch between natedit and TMCE
ReportedBy TWiki:Main.MarkVanHeeswijk
Codebase 4.1.2
SVN Range TWiki-4.3.0, Tue, 18 Dec 2007, build 16029
AppliesTo Extension
Component NatEditContrib
Priority Enhancement
CurrentState No Action Required
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip toggle_wysiwyg_files.zip r1 manage 6.8 K 2007-12-29 - 19:32 MarkVanHeeswijk files implementing wysiwyg switch
Compressed Zip archivezip toggle_wysiwyg_files_v2.zip r1 manage 28.6 K 2007-12-29 - 22:41 MarkVanHeeswijk wysiwyg toggle v2, including button graphics and readme.txt
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2010-10-12 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback