Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#10895 closed New Feature (fixed)

Image2 need to support server file browsers

Reported by: fbfactory Owned by: Marek Lewandowski
Priority: Normal Milestone: CKEditor 4.3
Component: UI : Dialogs Version: 4.3 Beta
Keywords: Cc:

Description

I upgraded to the Image2 plugin to be able to insert images with caption using html5 figure and figcaption elements. However, I realized the plugin does not support server file browsing, which is a total dealbreaker.

Change History (15)

comment:1 Changed 6 years ago by Olek Nowodziński

Status: newconfirmed

comment:2 Changed 6 years ago by Olek Nowodziński

Milestone: CKEditor 4.3

comment:3 Changed 6 years ago by Olek Nowodziński

We know about this issue. We're doing our best to allow a smooth transition from image to image2.

comment:4 Changed 6 years ago by Olek Nowodziński

Owner: set to Olek Nowodziński
Status: confirmedassigned

Integration under development: t/10895.

comment:5 Changed 6 years ago by Olek Nowodziński

Status: assignedreview

Integrated Image2 with file browsers, deriving from the old image plugin (t/10895).

Note: plugins/image2/dev/image2.html already supports CKFinder.

comment:6 Changed 6 years ago by Frederico Caldeira Knabben

Keywords: file browser image2 removed
Status: reviewreview_failed

I was not able to enable the browse button and the upload tab by just adding the following to the config:

config.filebrowserImageBrowseUrl = '/browser/browse.php?type=Images';
config.filebrowserImageUploadUrl = '/uploader/upload.php?type=Images';

Addiotionally, I know that the old dialog has this ugly thing, but couldn't we finally make it better and have the URL field taking the whole dialog width if the button will not be shown?

comment:7 Changed 6 years ago by Marek Lewandowski

Owner: changed from Olek Nowodziński to Marek Lewandowski
Status: review_failedassigned

hijacking this one :)

comment:8 Changed 6 years ago by Marek Lewandowski

Status: assignedreview

Url field will now adjust its width, but it's done in a tricky way (it alters config object). We may think about tweaking dialog a little bit, in the way that it will totally ignore rendering <td /> elements for hidden element, that would solve the problem.

comment:9 Changed 6 years ago by Frederico Caldeira Knabben

Status: reviewreview_failed

The final solution is mostly fine. We just agreed that the src field will *replace* the hbox that contains it, instead of having the button simply removed.

Last edited 6 years ago by Frederico Caldeira Knabben (previous) (diff)

comment:10 Changed 6 years ago by Marek Lewandowski

Status: review_failedreview

Now it's replacing it, but its a really nasty piece of code :\ Pushed to t/10895

comment:11 Changed 6 years ago by Frederico Caldeira Knabben

Status: reviewreview_failed
  • The button is not being displayed when setting filebrowserBrowseUrl only.
  • config.filebrowserImage2BrowseUrl has been introduced just to hack the filebrowser plugin. It's not the optimal approach for this configuration though, so better to check config.filebrowserImageBrowseUrl instead in the dialog file to be better future proof.
  • The curly-braces are missing in the "if" at line 540 in dialog.

comment:12 Changed 6 years ago by Marek Lewandowski

Commited to: t/10895

  • Thanks, i was not aware of filebrowserBrowseUrl :)
  • As for filebrowserImage2BrowseUrl i thought that it was temporary adapter rather than true hack
  • curly braces were removed on purpose, afaik we don't place braces if they are not essential, but just let me know if you are sure that you want me to add braces in this case

comment:13 Changed 6 years ago by Marek Lewandowski

Status: review_failedreview

comment:14 Changed 6 years ago by Frederico Caldeira Knabben

Status: reviewreview_passed

You have two lines inside that if, so in this case curly-braces are mandatory. I've just committed it and updated the branch with latest major.

comment:15 Changed 6 years ago by Marek Lewandowski

Resolution: fixed
Status: review_passedclosed

Merged to major with git:d4f479a253.

Last edited 6 years ago by Marek Lewandowski (previous) (diff)
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy