Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#21585 closed task (blessed) (fixed)

Gallery preview in the visual editor

Reported by: azaozz Owned by:
Priority: normal Milestone: 3.5
Component: Gallery Version:
Severity: normal Keywords:
Cc: Focuses:

Description

Display preview of the gallery in the visual editor.

Attachments (6)

21585.patch (46.6 KB ) - added by azaozz 14 years ago.
21585-1.patch (45.8 KB ) - added by azaozz 14 years ago.
21585-2.patch (23.9 KB ) - added by azaozz 14 years ago.
21585-3.patch (23.8 KB ) - added by azaozz 14 years ago.
Refreshed the patch for the min.js naming change
21585-4.patch (19.2 KB ) - added by azaozz 14 years ago.
21585-5.patch (20.3 KB ) - added by azaozz 14 years ago.

Download all attachments as: .zip

Change History (18)

@azaozz
14 years ago

#1 @azaozz
14 years ago

21585.patch is a "first run", still rough in many places.

  • Adds the 'noneditable' plugin to TinyMCE and uses it for the gallery preview (so the whole div is "static" in the editor).
  • The HTML for the gallery is fetched after TinyMCE loads or after switching Text -> Visual editor with XHR.
  • Supports all shortcode options.

@azaozz
14 years ago

#2 @azaozz
14 years ago

Changes in 21585-1.patch: remove some debug leftovers, move appending of the gallery preview div ID to ajax-actions.

#3 @ocean90
14 years ago

Tested in Chrome and some points:

  • wp_die() instead of die()
  • editor.dev.css has some whitespace/tabs trouble
  • Editor resizer is gone
  • Double edit icons: http://cl.ly/Ilsh
  • Some edit icons doesn't have a function, seems like only the upper left with the photo icon is the one, but not the delete button.
  • You can resize the images, but it will not be saved
  • Though I selected to link the images with the file it still links to the attachment page

#4 @simonwheatley
14 years ago

  • Cc simon@… added

@azaozz
14 years ago

#5 @azaozz
14 years ago

In 21585-2.patch:

  • Replaced die() with wp_die().
  • Better "content-not-editable" in the editor, uses a blocking div that can be styled and prevents access to the gallery thumbnails so IE and Firefox won't try to make them resizeable.
  • The Edit and Delete popup buttons work properly.

To-do: better default styling of the gallery preview. Themes will be able to style the preview (in editor-style.css), but we need a sensible default styling for themes that don't use the default gallery.

Still a bit worried that previewing the gallery in the visual editor would be awkward (marginal UX) as the users would expect to edit it directly. Darkening the preview and showing the Edit and Delete buttons make it clear it can't be edited.

@azaozz
14 years ago

Refreshed the patch for the min.js naming change

@azaozz
14 years ago

@azaozz
14 years ago

#6 @azaozz
14 years ago

In 21585-5.patch: stop Firefox selecting all of the gallery preview (and highlighting it in blue), make the old gallery settings popup work by letting the user edit the gallery shortcode directly (for testing).

#7 @nacin
14 years ago

  • Type enhancementtask (blessed)

#8 @azizur
14 years ago

  • Cc azizur added

#9 @nacin
14 years ago

Whatever happened here?

#10 @nacin
14 years ago

Last edited 14 years ago by nacin (previous) (diff)

#11 @nacin
14 years ago

  • Milestone 3.5
  • Resolutionduplicate
  • Status newclosed

Duplicate of #21815.

#12 @nacin
14 years ago

  • Milestone3.5
  • Resolution duplicatefixed

Oops, this is fixed — in the sense that the preview in the editor is improved. #21815 was the underlying "view" functionality that made that possible.

Note: See TracTickets for help on using tickets.