Opened 17 years ago

Closed 12 years ago

#1017 closed Bug (wontfix)

Problem with changing toolbars when they are outside the editor

Reported by: Maudib Owned by:
Priority: Normal Milestone:
Component: UI : Toolbar Version: SVN (FCKeditor) - Retired
Keywords: Cc:

Description

This is a new ticket on an item that we have been talking about in the forums:

http://www.fckeditor.net/forums/viewtopic.php?f=6&t=6392#p17191

Here is the scenario:

I want to have an editor with the toolbar set to an outside DIV.

Then I want to have two toolbars - a "Basic" (one row) and an "Advanced" (three row).

I want to have the default toolbar (loaded into the outside DIV be the Basic one.

Then I want to be able to use JS to load the Advanced toolbar into the outside DIV.

In this way, I can allow most users to have the Basic editor (less intimidating) and still allow those needing advanced features to switch to a toolbar that provides it.

Code for setting this up is pretty much the stock code from Example 10

Then I have these two functions to swap the toolbars:

function tbBasic()
{
  var oEditor = FCKeditorAPI.GetInstance('FCKeditor_1') ;
  oEditor.ToolbarSet.Load( 'Basic' ) ;
}

function tbDefault()
{
  var oEditor = FCKeditorAPI.GetInstance('FCKeditor_1') ;
  oEditor.ToolbarSet.Load( 'Default' ) ;

There are a couple of problems.

(keep in mind that the initial display is of the Basic (one row toolbar).

One is that while the Advanced toolbar will load when the function is called, it only displays the first row of the toolbar since the DIV does not resize properly.

The other is that if you start with the Advanced (three row) toolbar and switch to the Basic one - the DIV for the toolbars does not resize down to the single row.

I realize the problem is in fact the same - but since the desired effect is to start with the Basic and change up to the Advanced, this is not possible.

A couple of nights ago a new nightly build had some changes in place that would trigger the DIV to resize, but this had the adverse effect of causing the app to lose focus and disappear behind other apps (if a page was loaded into a browser in a desktop application).

That of course was a show stopper and I guess in the last night's build it was changed (or removed).

The latest build seems to work fine except for the original problem.

Right now the only way I can create the desired effect is to have TWO sets of editors and TWO sets of toolbar DIVs. Each one gets loaded with its own toolbar (one Basic and the other Advanced) and I have to use a SHOW/HIDE routine as well as transfer the content between the editors.

While this does accomplish the effect (and allows me to resize the width of the editors to simulate column entry (without wrapping the toolbars), it is a lot of extra code to maintain, extra objects on the page, memory used, etc.

Hopefully this gives you all the info you need to see what is going wrong and you can come up with a solution for it that does not cause the app to disappear (when a HTML page is loaded into a desktop application).

Let me know if there is anything I can test for you or any other info I can provide.

BTW - thanks to everyone for great work!

;-)

MD

Attachments (1)

TC_1017.html (1.3 KB) - added by Wojciech Olchawa 17 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 17 years ago by Frederico Caldeira Knabben

Priority: HighNormal

comment:2 Changed 17 years ago by Alfonso Martínez de Lizarrondo

So the problem is:

If an editor with toolbarlocation = out starts with a single row toolbar, then switching to a toolbar with three rows doesn't grow the toolbar.

Are you sure that this problem didn't exist in 2.4.3?

comment:3 Changed 17 years ago by Maudib

Yes, in an editor with toolbarlocation, if you switch the toolbar between one row (and any number of rows more than one) the toolbar does not grow.

Also when you switch back down the toolbar does not shrink.

The problem did exist in 2.4.3 (that was where we were working when we discovered it).

The initial fix that was done DID correct the problem, but it was not a smooth transition (the toolbar would change to the first row of the multi-row toolbar set, then sort of "pop out" and expand to show the other rows.

There was also a fatal flaw in that the method used to fix the problem would cause ANY desktop application that had the page loaded to lose focus and disappear behind all other desktop applications every time the page was loaded.

comment:4 Changed 17 years ago by Wojciech Olchawa

Keywords: Confirmed added

Confirmed using IE and FF2.

I've attached an example page that will help to illustrate the problem.

Changed 17 years ago by Wojciech Olchawa

Attachment: TC_1017.html added

comment:5 Changed 12 years ago by Jakub Ś

Resolution: wontfix
Status: confirmedclosed

FCKeditor is no longer supported and there are two tickets for CEditor that describe this issue - #7280 and #7038. It will be fixed in CKEDitor.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy