WordPress.org

Make WordPress Core

#19843 closed enhancement (fixed)

Editor API + DFW

Reported by: sushkov Owned by: sushkov
Priority: normal Milestone: 3.4
Component: Editor Version:
Severity: normal Keywords: dev-feedback has-patch
Cc: azaozz

Description

Currently wp_editor() has no out-of-the-box support for DFW

TinyMCE wpfullscreen plugin has to be tweaked and proper CSS/JS files enqueued.

Attachments (2)

19843.diff (12.7 KB) - added by sushkov 16 months ago.
Titles should not be cached anymore.
19843-2.patch (23.2 KB) - added by azaozz 16 months ago.

Download all attachments as: .zip

Change History (20)

comment:1 scribu17 months ago

  • Keywords has-patch added

comment:3 sushkov16 months ago

You can use this plugin to test editors:
https://gist.github.com/1820220

Before using, run the minifier!

sushkov16 months ago

Titles should not be cached anymore.

comment:4 sushkov16 months ago

I also updated the gist, if you want to stress-test it.
https://gist.github.com/1820220

azaozz16 months ago

comment:5 azaozz16 months ago

Refreshed the patch and added some missing parts.

comment:6 azaozz16 months ago

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

In [20166]:

Add support for DFW for all instances of the editor, part props sushkov, fixes #19843

comment:7 azaozz16 months ago

Tested separating the DFW styles in another stylesheet: it doesn't make much difference as when minified and compressed the combined stylesheet is only 1KB larger. Better to have all editor related styles in one stylesheet and avoid the extra request when on the front-end.

comment:8 sushkov16 months ago

Fair enough.
Thanks.

comment:9 nacin15 months ago

In [20283]:

Move editor-buttons.css to editor.css to reflect its current use. see #19843.

comment:10 ocean9015 months ago

  • Milestone changed from Awaiting Review to 3.4

comment:11 follow-up: nacin15 months ago

Via ocean90, plugins that enqueue editor-buttons directly:

slidedeck-lite-for-wordpress/slidedeck.php
rich-text-tags/rich-text-tags.php
marctv-quicktags/marctv_quicktags.php
easy-admin-color-schemes/easy-admin-color-schemes.php
ckeditor-for-wordpress/ckeditor_class.php

Sigh.

Version 0, edited 15 months ago by nacin (next)

comment:12 in reply to: ↑ 11 azaozz15 months ago

Replying to nacin:

Via ocean90, plugins that enqueue editor-buttons directly...

Ugh, hope we can keep the rename. There is a way to make it back-compat: add a css file with the old name that only has one @import rule at the top and a comment that it's deprecated.

Last edited 15 months ago by azaozz (previous) (diff)

comment:13 ocean9015 months ago

enqueue editor-buttons directly

Not sure if it's clear, but they are using wp_print_styles / wp_enqueue_style, not directly the files.

So we could handle this in wp_print_styles / wp_enqueue_style. If $handle is editor-buttons set $handle to editor and return a _deprecated_argument message. Should be enough.

comment:14 follow-up: nacin15 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

The problem also is things like dependencies. If someone specifies 'editor-buttons' as a dependency we'll have to handle the renaming there as well.

We could just rename back the handle and leave the file as editor.dev.css, for now.

comment:15 in reply to: ↑ 14 azaozz15 months ago

Replying to nacin:

We could just rename back the handle and leave the file as editor.dev.css, for now.

Or perhaps have both handles 'editor-buttons' and 'editor' (pointing to the same file) and trigger a deprecated notice if the first one is used. Or even email the 7 plugins authors and ask them to change the handle name?

comment:16 sushkov15 months ago

+1 for getting in touch with authors.
All the plugins were updated during last couple of months, so it should not be a problem.

comment:17 nacin15 months ago

Let's just rename back the handle for 3.4.

comment:18 azaozz15 months ago

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

In [20334]:

Rename back the handle for the editor CSS, props nacin, fixes #19843

Note: See TracTickets for help on using tickets.