Opened 9 years ago

Closed 5 years ago

#2599 closed New Feature (wontfix)

Allow an arbitrary query string, and propagate it to dialog boxes

Reported by: kennardconsulting Owned by:
Priority: Normal Milestone:
Component: UI : Dialogs Version:
Keywords: Confirmed Cc:


Hey guys,

Thanks so much for FCKEditor - it really is a superb piece of work and you deserve all your success. I have a small feature request:

In FCKeditor._GetIFrameHtml, you do...

if (this.ToolbarSet) sLink += '&Toolbar=' + this.ToolbarSet;

...I would like to see this capability extended so that I can attach arbitrary things to the query string. For example...

new FCKEditor( 'x' ).extraParameters = 'foo=bar';

...which, in turn, get passed to every dialog box...

FCKDialogCommand.prototype.Execute = function() {

FCKDialog.OpenDialog( 'FCKDialog_' + this.Name, this.Title, this.Url + '?' + this.extraParameters

Why do such a thing? One of the best features (for me) about FCK is being able to tweak the dialog boxes to suit my needs. For example, I tweak fck_image.html and insert some server-side script to turn the image box into a dropdown SELECT of available images.

To do this at the moment, I have to override FCK in a number of places to feed a query parameter from my top-level page (the one that includes the TEXTAREA) into the image dialog box.

Native support for passing parameters along would be neat.

Change History (7)

comment:1 Changed 9 years ago by Artur Formella

Keywords: Confirmed added

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

Resolution: wontfix
Status: newclosed

You can add some custom config entries with the values that you want, and read them just from the dialog that needs them, there's no need to change the whole system.

comment:3 Changed 9 years ago by kennardconsulting

Resolution: wontfix
Status: closedreopened

I appreciate you looking at my issue. I don't think custom config entries meet my needs, for two reasons:

  1. The values I need are very dynamic. Say the parent page is...


...then I need a way to pass '123' (or whatever value it happens to be) at runtime. So I don't think it fits well as a config issue.

  1. If it's a custom config, it's much harder to get at it server-side. I'd need to AJAX it back or something. If it's a querystring parameter, I can just do...


I'd really appreciate it if you could reconsider your 'wontfix'.



comment:4 Changed 9 years ago by Frederico Caldeira Knabben

Resolution: wontfix
Status: reopenedclosed
Summary: Allow an arbitary query string, and propogate it to dialog boxesAllow an arbitrary query string, and propagate it to dialog boxes


As explained by Alfonso, this is totally doable today, with easy. Taking your original reported example, you could do the following:

var editor = new FCKEditor( 'x' );
editor.Config['foo'] = 'bar';

Then, you just need to retrieve the 'foo' configuration value in the dialog for your custom needs.

If you instead need to retrieve the main page querystring from inside the dialog, top.document.location is enough for it.

comment:5 Changed 9 years ago by kennardconsulting

Resolution: wontfix
Status: closedreopened


I appreciate your patience. You have certainly answered my first point.

However, please bear with me. To my second point: if I set the editor.Config in my main page, by the time I get to my dialog box (first via fckeditor.htm and then fck_image.htm) it seems very hard to get at that value server-side?

What I do is override my JSP processor to handle serving up fck_image.htm. Then I can pop a small amount of server-side script in that dialog box. It's easy for the script to say...


<c:forEach var="image" items="${getAllImagesFor(}">




...but not possible for the script to say...


<c:forEach var="image" items="${getAllImagesFor( editor.Config['foo'] )}">




...because 'editor' is client side, not server-side.

I understand if you think this feature is too marginal to add to FCK, just so long as you understand what I'm asking for :)

comment:6 Changed 9 years ago by Michael Osipov

Move this discussion to the forums and I will try to help you on the Java side.

comment:7 Changed 5 years ago by Jakub Ś

Resolution: wontfix
Status: reopenedclosed

FCKeditor was retired and is no longer supported. All active development was moved to its successor, CKEditor 3.x, that is a fully mature and far superior product. We recommend you upgrade as soon as possible.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy