Opened 16 years ago
Closed 12 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: |
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 (7)
comment:1 Changed 16 years ago by
Keywords: | Confirmed added |
---|
comment:2 Changed 16 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:3 Changed 16 years ago by
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
I appreciate you looking at my issue. I don't think custom config entries meet my needs, for two reasons:
- 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.
- 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 16 years ago by
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Summary: | Allow an arbitary query string, and propogate it to dialog boxes → 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 16 years ago by
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
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 16 years ago by
Move this discussion to the forums and I will try to help you on the Java side.
comment:7 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
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.
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.