Ticket #2599 (closed New Feature: wontfix)

Opened 6 years ago

Last modified 20 months ago

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:

Description

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

comment:1 Changed 6 years ago by arczi

  • Keywords Confirmed added

comment:2 Changed 6 years ago by alfonsoml

  • Status changed from new to closed
  • Resolution set to wontfix

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 6 years ago by kennardconsulting

  • Status changed from closed to reopened
  • Resolution wontfix deleted

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

myPage.jsp?foo=123

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

${param.foo}

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

Thanks,

Richard.

comment:4 Changed 6 years ago by fredck

  • Status changed from reopened to closed
  • Resolution set to wontfix
  • Summary changed from Allow an arbitary query string, and propogate it to dialog boxes to Allow an arbitrary query string, and propagate it to dialog boxes

@kennardconsulting,

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 6 years ago by kennardconsulting

  • Status changed from closed to reopened
  • Resolution wontfix deleted

Guys,

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

<select>

<c:forEach var="image" items="${getAllImagesFor(param.foo)}">

<option>${image}</option>

</c:forEach>

</select>

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

<select>

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

<option>${image}</option>

</c:forEach>

</select>

...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 6 years ago by mosipov

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

comment:7 Changed 20 months ago by j.swiderski

  • Status changed from reopened to closed
  • Resolution set to wontfix

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 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy