• 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.

Item4665: NatEditContrib and TinyMCEPlugin don't play well together

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension NatEditContrib Urgent Closed   minor 4.2.0

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

-- TWiki:Main/CarloSchulz - 18 Sep 2007

Problem

If you use NatEditContrib and TinyMCEPlugin together the edit screen is totally messed up as two different button bars are displayed.

Desired Solution

If TMCE is able to open a topic display only the save, save & continue, preview and cancel buttons.

If TMCE is not able to open a topic display the entire button bar of NatEditContrib.

How to do this

I don't know. I'm just a user and I want to use both.:-(

I'm bouncing this back to NatEditContrib (sorry, guys) because TinyMCEPlugin is in the standard release but NatEditContrib is not, so I am not going to spend any time on it.

CC

Understandable, but I find this more than unfortunate. There are quiet a few users out there using NatSkin or NatEditContrib. I know both are not in the standard package, nevertheless we should take care of those who use them and include somekind of note into the relese.

-- TWiki:Main.CarloSchulz - 20 Sep 2007

I think CC just told us that HE will not spend time on fixing this. But anyone else with an interest and the skills can take a stab at at NatSkin and NatEditContrib fixing. Even of the bug item is marked urgent, it is not a release blocker because it does not affect the core or default plugins

-- TWiki:Main.KennethLavrsen - 20 Sep 2007

I'm not expecting anything from CC (who did so much already) or anyone else, it's just a unfortunate situation for me and other NatSkin users. I would fix this if I could but I'm afraid that I'm missing the skills to do so.

-- TWiki:Main.CarloSchulz - 21 Sep 2007

I am planning on dealing with this and a few other issues some time before the end of Wednesday - presuming that its not a major big deal.

-- TWiki:Main.SvenDowideit - 21 Sep 2007

There's no good way to do this, TinyMCEPlugin uses plugin magic to be enabled, rather than the previous Contrib mechanism, and as NatEditContrib is not a plugin, its all messy.

here's a patch that will work for now..

Index: lib/TWiki/Contrib/NatEditContrib.pm
===================================================================
--- lib/TWiki/Contrib/NatEditContrib.pm   (revision 14603)
+++ lib/TWiki/Contrib/NatEditContrib.pm   (working copy)
@@ -1,6 +1,6 @@
 package TWiki::Contrib::NatEditContrib;
 use vars qw($VERSION $RELEASE);
 $VERSION = '$Rev$';
-$RELEASE = 'v1.41';
+$RELEASE = 'v1.42';
 
 1;
Index: pub/TWiki/NatEditContrib/edit.js
===================================================================
--- pub/TWiki/NatEditContrib/edit.js   (revision 14620)
+++ pub/TWiki/NatEditContrib/edit.js   (working copy)
@@ -209,6 +209,12 @@
 
 
 function natEditInit() {
+  if (tinyMCE.init) {
+      //don't initialise natEdit if TinyMCE is running
+      var toolbar = document.getElementById('natEditToolBar1');
+      toolbar.style.visibility = "hidden";
+      return;
+  }
   if (txtarea) {
     //alert("txtarea is already "+txtarea);
   } else {
Index: data/TWiki/NatEditContrib.txt
===================================================================
--- data/TWiki/NatEditContrib.txt   (revision 14603)
+++ data/TWiki/NatEditContrib.txt   (working copy)
@@ -139,9 +139,9 @@
 |  Author: | TWiki:Main/MichaelDaum |
 |  Copyright ©: | 2007 Michael Daum http://wikiring.de |
 |  License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
-|  Version: | v1.41 |
+|  Version: | v1.42 |
 |  Change History: | |
-|  23 Aug 2007 | bug fixes for IE6&7 - [[http://develop.twiki.org/~twiki4/cgi-bin/view/Bugs/Item4430][Item4430]] |
+|  25 Aug 2007 | bug fixes for IE6&7, many corner cases fixed - [[http://develop.twiki.org/~twiki4/cgi-bin/view/Bugs/Item4430][Item4430]] |
 |  04 Aug 2007 | added Word theme \
                  added bullet and numbered lists buttons & Javascript \
                  added create Table button and Javascript \
Index: templates/edittoolbar.word.natedit.tmpl
===================================================================
--- templates/edittoolbar.word.natedit.tmpl   (revision 14603)
+++ templates/edittoolbar.word.natedit.tmpl   (working copy)
@@ -10,7 +10,7 @@
 %TMPL:P{"undentbutton"}%
 </ul>%TMPL:END%
 
-%TMPL:DEF{"edittoolbar"}%<div class="natEditToolBar">
+%TMPL:DEF{"edittoolbar"}%<div class="natEditToolBar"  id="natEditToolBar1">
 %{ exittools }%<ul class="natEditExitTools">
 %TMPL:P{"savebutton"}%
 %TMPL:P{"checkpointbutton"}%
Index: templates/edittoolbar.natedit.tmpl
===================================================================
--- templates/edittoolbar.natedit.tmpl   (revision 14603)
+++ templates/edittoolbar.natedit.tmpl   (working copy)
@@ -1,4 +1,4 @@
-%TMPL:DEF{"edittoolbar"}%<div class="natEditToolBar">
+%TMPL:DEF{"edittoolbar"}%<div class="natEditToolBar" id="natEditToolBar1">
 %TMPL:P{"helptools"}%
 %TMPL:P{"texttools"}%
 %TMPL:P{"headlinetools"}% 
Index: templates/editformtoolbar.natedit.tmpl
===================================================================
--- templates/editformtoolbar.natedit.tmpl   (revision 14603)
+++ templates/editformtoolbar.natedit.tmpl   (working copy)
@@ -1,4 +1,4 @@
-%TMPL:DEF{"edittoolbar"}%<div class="natEditToolBar">
+%TMPL:DEF{"edittoolbar"}%<div class="natEditToolBar"  id="natEditToolBar1">
 %TMPL:P{"edittools"}%
 %TMPL:P{"exittools"}%
 </div>%TMPL:END%

-- SvenDowideit - 01 Oct 2007

Thanksa lot Sven, I think I'll have time to check it on friday...

-- TWiki:Main.CarloSchulz - 02 Oct 2007

Nah, that's no good.

The root of the incompatibility was that the textarea has to be named 'topic' in the markup. Otherwise the TinyMCEPlugin won't find it. Then a piece of javascript is needed to switch off part of the toolbar during wysiwyg while leaving it intact when tinymce falls back to wikiwyg. The above js code will produce an error while using an undefined value. Part of these changes go into NatEdit, the markup adjustments to NatSkin.

-- TWiki:Main.MichaelDaum - 02 Oct 2007

So what does that mean? Is this item really closed or not? Had no time to check it out so far....

-- TWiki:Main.CarloSchulz - 08 Oct 2007

Please do test. I made new releases for NatEdit and NatSkin to fix this.

-- TWiki:Main.MichaelDaum - 08 Oct 2007

When I installed this, I no longer have any the standard buttons ("Save",etc) - neither patternskin nor natedit styled buttons - with TinyMCE. Have reverted back - will investigate later. It would be nice to keep the NatEdit "look-and-feel" i.e. keep the natedit standard buttons up on top of the textarea, for those who don't like scrolling down to the end of the topic.

-- TWiki:Main.JohnFitzpatrick - 08 Oct 2007

I can confirm this for the word-like toolbar ... fixed.

-- TWiki:Main.MichaelDaum - 08 Oct 2007

Hmmm.

The new fix doesn't work in my default setup:

    • Set SKIN = word.natedit, natedit, pattern

..... but it does if I do this:

    • Set SKIN = jquery, word.natedit, natedit, pattern

Unfortunately, I cannot use jquery due to unresolved performance issues with IE6 frown

-- TWiki:Main.JohnFitzpatrick - 08 Oct 2007

ItemTemplate
Summary NatEditContrib and TinyMCEPlugin don't play well together
ReportedBy TWiki:Main.CarloSchulz
Codebase 4.1.2, 4.2.0, ~twiki4
SVN Range TWiki-4.3.0, Tue, 18 Sep 2007, build 14939
AppliesTo Extension
Component NatEditContrib
Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:15133 TWikirev:15134 TWikirev:15135 TWikirev:15136 TWikirev:15138 TWikirev:15203 TWikirev:15204
TargetRelease minor
ReleasedIn 4.2.0
Edit | Attach | Watch | Print version | History: r25 < r24 < r23 < r22 < r21 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r25 - 2007-10-08 - JohnFitzpatrick
 
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