Commit Graph

144 Commits

Author SHA1 Message Date
Sergey Biryukov
63a875ce80 Use correct variable.
props azaozz.
see #24472.
Built from https://develop.svn.wordpress.org/trunk@28945


git-svn-id: http://core.svn.wordpress.org/trunk@28742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-01 23:30:15 +00:00
Sergey Biryukov
63b1667a01 Add a filter for wp_editor() settings.
props DH-Shredder, JPry, DrewAPicture.
fixes #24472.
Built from https://develop.svn.wordpress.org/trunk@28944


git-svn-id: http://core.svn.wordpress.org/trunk@28741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-01 23:03:15 +00:00
Andrew Ozz
f7186fb198 TinyMCE: update to 4.0.26. Includes fixes for the 'paste' plugin (paste from Word/Excel, paste in WebKit/Blink), show/hide/isHidden in inline mode, drag/drop in tables and in Safari, and others. Fixes #28342, #28016, #28250 and #28067
Built from https://develop.svn.wordpress.org/trunk@28568


git-svn-id: http://core.svn.wordpress.org/trunk@28393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-24 01:44:15 +00:00
Andrew Nacin
9f00179c58 Improve TinyMCE string for paste command browser support.
props ebinnion.
fixes #27988.

Built from https://develop.svn.wordpress.org/trunk@28220


git-svn-id: http://core.svn.wordpress.org/trunk@28050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-25 21:20:14 +00:00
Andrew Ozz
c621255236 Run WP_Editors::enqueue_scripts() on admin_print_footer_scripts priority 1 (later), instead of admin_footer. Fixes incompatibility with the customizer. Props feedmeastraycat, see #27853, for trunk.
Built from https://develop.svn.wordpress.org/trunk@28187


git-svn-id: http://core.svn.wordpress.org/trunk@28018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-22 22:41:14 +00:00
Andrew Ozz
3de93ccba3 DFW:
- Add background color and remove the top border from the status bar (at the bottom).
- Fix spinner to always be next to the Save button.
- Remove width: auto; from .mce-fixed-width.
Fixes #27709
Built from https://develop.svn.wordpress.org/trunk@28116


git-svn-id: http://core.svn.wordpress.org/trunk@27947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-14 08:15:16 +00:00
Andrew Nacin
5ab50ba7d5 TinyMCE: Always load translations, even in English, as we modify some strings.
Move a setting to after the translations filter, and remove unused strings.

see #24067.

Built from https://develop.svn.wordpress.org/trunk@28112


git-svn-id: http://core.svn.wordpress.org/trunk@27943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-14 03:23:15 +00:00
Andrew Nacin
ad850a34a4 Add context to string added in [28097].
props azaozz.
fixes #27785.

Built from https://develop.svn.wordpress.org/trunk@28099


git-svn-id: http://core.svn.wordpress.org/trunk@27930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-13 16:35:14 +00:00
Andrew Nacin
23d78b1777 Add missing 'Address' string for TinyMCE.
props pavelevap, ocean90.
fixes #27785.

Built from https://develop.svn.wordpress.org/trunk@28097


git-svn-id: http://core.svn.wordpress.org/trunk@27928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-13 16:21:15 +00:00
Andrew Ozz
dc52e17417 RTL for TinyMCE:
- Add _dir: 'rtl' to the TinyMCE translation object.
- Fix editor.css for RTL.
- Fix the Edit and Delete buttons position for wpview and images.
- For _mce_set_direction(), update documentation and fix adding the 'ltr' button.
Fixes #27773
Built from https://develop.svn.wordpress.org/trunk@28094


git-svn-id: http://core.svn.wordpress.org/trunk@27925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-13 00:23:15 +00:00
Andrew Nacin
5ca6bdf7c2 Add an explanation for 'Paste from Word' in the 'Paste from Text' dialog.
fixes #27777. see #27160.

Built from https://develop.svn.wordpress.org/trunk@28091


git-svn-id: http://core.svn.wordpress.org/trunk@27922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-12 20:48:28 +00:00
Andrew Ozz
68cbde29ca Don't include the non-minified tinymce.js in /build. Load it when running from /src, else load wp-tinymce.js.gz (production) or tinymce.min.js (SCRIPT_DEBUG). Props nacin, fixes #27739
Built from https://develop.svn.wordpress.org/trunk@28081


git-svn-id: http://core.svn.wordpress.org/trunk@27912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-11 22:16:14 +00:00
Andrew Nacin
115b91faff Editor: Ensure the link dialog does not display when styles are missing.
props mattheu.
fixes #27605.

Built from https://develop.svn.wordpress.org/trunk@28071


git-svn-id: http://core.svn.wordpress.org/trunk@27902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-11 03:09:15 +00:00
Andrew Ozz
5ca1024284 TinyMCE: make sure vertical resizing and menubar show/hide are set to default for each instance, fixes #27724
Built from https://develop.svn.wordpress.org/trunk@28059


git-svn-id: http://core.svn.wordpress.org/trunk@27891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 18:58:14 +00:00
Andrew Ozz
268092761d DFW:
- Move the word count and "Just Write" to a fixed bar at the bottom.
- Fix responsive mode to 480px. Narrower screens will have a scroll bar.
- Hide the Help button on screens < 480px, move the Save button to the right, make it bigger to match the others, and other responsive mode fixes.
Fixes #26907, see #27709
Built from https://develop.svn.wordpress.org/trunk@28043


git-svn-id: http://core.svn.wordpress.org/trunk@27873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 07:49:14 +00:00
Andrew Nacin
819da2ac6d Nuke the TinyMCE help dialog as it is duplicated by help tabs. This leaves just Keyboard Shortcuts.
fixes #27100.

Built from https://develop.svn.wordpress.org/trunk@28032


git-svn-id: http://core.svn.wordpress.org/trunk@27862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 02:32:14 +00:00
Andrew Ozz
06acbdcd5a TinyMCE help modal:
- Don't load the old tiny_mce_popup.js.
- Add the shortcut for <code> and the second shortcut for link to the shortcuts listing.
- Update some of the text.
See #27100
Built from https://develop.svn.wordpress.org/trunk@28027


git-svn-id: http://core.svn.wordpress.org/trunk@27857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 23:53:15 +00:00
Drew Jaynes
697bef3383 Improve hook docs for the wp_enqueue_editor hook, added in 3.9.
See #16284, #27700.

Built from https://develop.svn.wordpress.org/trunk@28026


git-svn-id: http://core.svn.wordpress.org/trunk@27856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 23:09:15 +00:00
Andrew Ozz
5ce9ab1293 Fix typo and add more text to the error shown when 'wpdialogs' is not enqueued. Add 'wp_enqueue_editor' action fired when scripts and styles for the editor are being enqueued, fixes #16284
Built from https://develop.svn.wordpress.org/trunk@28024


git-svn-id: http://core.svn.wordpress.org/trunk@27854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 22:55:15 +00:00
Andrew Ozz
956301ece7 TinyMCE:
- Tighten up button styles, add :hover for .mce-active buttons.
- Pad only the first toolbar row and remove the padding in both toolbars if the editor doesn't have a DFW mode.
Part props avryl, see #27279
Built from https://develop.svn.wordpress.org/trunk@27978


git-svn-id: http://core.svn.wordpress.org/trunk@27808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 01:10:15 +00:00
Andrew Ozz
24d026f682 Throw a user notice when the editor ID used for TinyMCE contains brackets, props nacin, fixes #27601
Built from https://develop.svn.wordpress.org/trunk@27950


git-svn-id: http://core.svn.wordpress.org/trunk@27780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-05 01:11:16 +00:00
Andrew Ozz
86d10100d8 TinyMCE: update translatable strings, see #27453, #24067
Built from https://develop.svn.wordpress.org/trunk@27927


git-svn-id: http://core.svn.wordpress.org/trunk@27757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-03 05:16:15 +00:00
Andrew Ozz
1c3cc50496 TinyMCE:
- Bring back loading of /langs/[locale].js and /langs/[locale]_dlg.js from PHP. Prevents errors with missing translation files when custom plugins use requireLangPack() without second argument.
- Back to using ISO 639-1 (two letter) locales as the locale is used as part of the translation file name.
See #24067, fixes #27610
Built from https://develop.svn.wordpress.org/trunk@27922


git-svn-id: http://core.svn.wordpress.org/trunk@27752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-03 03:40:15 +00:00
Andrew Ozz
668235fb42 Drag and drop files on the editor to upload: add new argument to wp_editor() to enable, fixes #27465
Built from https://develop.svn.wordpress.org/trunk@27901


git-svn-id: http://core.svn.wordpress.org/trunk@27732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-02 02:42:16 +00:00
Andrew Ozz
2547ba21ae TinyMCE: update to 4.0.21, see #24067
Built from https://develop.svn.wordpress.org/trunk@27897


git-svn-id: http://core.svn.wordpress.org/trunk@27728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-01 22:46:14 +00:00
Andrew Ozz
86910b9a21 Add class wp-core-ui to DFW and wpLink as it is required by buttons.css. Props avryl, see #27279
Built from https://develop.svn.wordpress.org/trunk@27858


git-svn-id: http://core.svn.wordpress.org/trunk@27689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-30 00:37:15 +00:00
Andrew Ozz
bfaf007e97 Editor:
- Use standard button styles for the Quicktags buttons.
- Better style for the TinyMCE buttons (hover/focus/active/disabled).
- Move the fullscreen (DFW) button to the right.
- Better style for the Visual/Text buttons in DFW.
Props avryl, see #27279
Built from https://develop.svn.wordpress.org/trunk@27857


git-svn-id: http://core.svn.wordpress.org/trunk@27688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-29 23:58:14 +00:00
Drew Jaynes
4ce89ca20c Inline documentation for hooks in wp-includes/class-wp-editor.php.
Props kpdesign for some cleanup.
Fixes #27523.

Built from https://develop.svn.wordpress.org/trunk@27828


git-svn-id: http://core.svn.wordpress.org/trunk@27662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-28 21:33:14 +00:00
Drew Jaynes
a85b4330d9 Wow. One more time with the typos.
I can, in fact, spell 'instance'.

See #27566.

Built from https://develop.svn.wordpress.org/trunk@27810


git-svn-id: http://core.svn.wordpress.org/trunk@27644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-28 05:54:14 +00:00
Drew Jaynes
0397f7a739 Better description and fixed typo for _WP_Editors::parse_settings().
See [27808]. See #27566.

Built from https://develop.svn.wordpress.org/trunk@27809


git-svn-id: http://core.svn.wordpress.org/trunk@27643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-28 05:51:13 +00:00
Drew Jaynes
639c11621a Convert wp_editor() default arguments documentation to a hash notation in the _WP_Editors::parse_settings() PHPDoc.
See #27566.

Built from https://develop.svn.wordpress.org/trunk@27808


git-svn-id: http://core.svn.wordpress.org/trunk@27642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-28 05:46:15 +00:00
Andrew Ozz
b2b6d416f3 Add aria-label to the DFW buttons, props joedolson, fixes #26555
Built from https://develop.svn.wordpress.org/trunk@27766


git-svn-id: http://core.svn.wordpress.org/trunk@27603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-27 01:14:15 +00:00
Andrew Nacin
60676ee282 Introduce HTML5 caption support.
When a theme supports HTML5 captions via add_theme_support( 'html5', 'caption' ), figure and figcaption will be used instead of div and p.

There's a bonus. But first, some history: Captions were introduced with an inline style set for the container. This remains, as it is there to force captions to wrap. But this inline style included an extra 10 pixels, which have vexxed theme developers for years. While these pixels were designed to ensure padding around floated images, modern themes handle this with grace. The additional pixels thus feel encumbering.

As the new HTML5 gallery support avoids outputting default gallery styles (again, irking theme developers for years; see #26697), the new HTML5 caption support will also ditch these 10 pixels of unwanted hand-holding. 

The 10 pixels are also removed entirely in the visual editor (and more styles may also disappear here; see #26642), giving themes the power necessary to match the frontend styles.

The filter img_caption_shortcode_width added in 3.7 to work around this madness (see #14380) is skipped entirely when the theme supports HTML5 captions.

props obenland, azaozz.
see #26642. also fixes #9066.

Built from https://develop.svn.wordpress.org/trunk@27668


git-svn-id: http://core.svn.wordpress.org/trunk@27511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 02:05:14 +00:00
Andrew Ozz
33faa15a11 TinyMCE:
- Fix PressThis styling when the popup is resized.
- Don't force loading of the media JS.
- Add the 'image' plugin as fallback when no media button(s).
- Add back the link icon tooltip/menu item string for translation.
See #24067, see #24409

Built from https://develop.svn.wordpress.org/trunk@27660


git-svn-id: http://core.svn.wordpress.org/trunk@27503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-23 07:10:14 +00:00
Helen Hou-Sandí
6a1f7ca4fe Add the version string to wp-content.css to avoid tenacious caching woes. see #27320.
Built from https://develop.svn.wordpress.org/trunk@27629


git-svn-id: http://core.svn.wordpress.org/trunk@27472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 01:08:13 +00:00
Andrew Nacin
de8f6c7350 TinyMCE strings: Merge, remove, reorganize, restore, clarify.
see #27453, #24067.

Built from https://develop.svn.wordpress.org/trunk@27618


git-svn-id: http://core.svn.wordpress.org/trunk@27461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 07:18:13 +00:00
Scott Taylor
e47bc77616 Load MediaElement's CSS when TinyMCE is loaded via $mce_css in editor_settings(). Add some baseline styles in wp-content.css for audio, video, and embed tags to ensure their max-width is 100%, regardless of whether MEjs is implemented in TinyMCE.
See #27389.


Built from https://develop.svn.wordpress.org/trunk@27534


git-svn-id: http://core.svn.wordpress.org/trunk@27377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 12:34:16 +00:00
Andrew Ozz
93ec80e732 Modals: darken all overlays, update all box-shadows and headings, correct thickbox styling, make the link modal narrower and bring back the animation (css transition). Props avryl, see #26952
Built from https://develop.svn.wordpress.org/trunk@27532


git-svn-id: http://core.svn.wordpress.org/trunk@27375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 05:55:16 +00:00
Scott Taylor
b4569b69dc Revert [27528] until Flash in Firefox behaves :(
See #27389.


Built from https://develop.svn.wordpress.org/trunk@27530


git-svn-id: http://core.svn.wordpress.org/trunk@27373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-13 23:39:16 +00:00
Scott Taylor
ba84f57083 Add MCE Views for audio and video. Please clear your browser cache so that you get the latest TinyMCE stylesheet.
* Move TinyMCE shortcode handling from `wpgallery` plugin to `mce-view.js`
* Force `preload="none"` when rendering media in the editor to ensure fast loading (I realize this sounds illogical)
* Move audio and video tag builder logic in `media-template.php` into PHP funcs that can be reused by any code passing `data.model` to an Underscore template
* Pause all players when moving between editor tabs and when moving from the editor to editing in the media modal.
* Rename `wp.media.audio|video.shortcode()` to the more appropriate `wp.media.audio|video.update()` that now returns a `wp.shortcode` object instead of a string.
* Add necessary MediaElement css files to `$mce_css`
* In `wp.mce.View.render()`, support multiple instances of the same shortcode
* When rendering `wp.mce.View`s, fire a ready event that passes the current MCE View root element as context 

See #27389.


Built from https://develop.svn.wordpress.org/trunk@27528


git-svn-id: http://core.svn.wordpress.org/trunk@27371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-13 23:10:14 +00:00
Andrew Ozz
d1008b2dfe wpLink: bring back the Cancel link, improve responsive styles, see #26952
Built from https://develop.svn.wordpress.org/trunk@27510


git-svn-id: http://core.svn.wordpress.org/trunk@27353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-12 03:07:15 +00:00
Andrew Ozz
05e23f7506 wpLink: stop using UI dialog, restyle the modal, add better responsive behaviour.
Fix UI dialog styling to match the rest of the admin styling.
Props avryl, see #26952
Built from https://develop.svn.wordpress.org/trunk@27494


git-svn-id: http://core.svn.wordpress.org/trunk@27336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-11 00:04:14 +00:00
Andrew Ozz
6f1668c43d TinyMCE:
- Restore the "link" button state to disabled by default and enabled when text or image is selected.
- Remove the (recently added) default `link` plugin, not needed for `wpLink`.
See #27309
Built from https://develop.svn.wordpress.org/trunk@27447


git-svn-id: http://core.svn.wordpress.org/trunk@27293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-07 02:02:13 +00:00
Andrew Ozz
f0bfa77a4a TinyMCE: add the <hr> plugin and button, see #27159
Built from https://develop.svn.wordpress.org/trunk@27428


git-svn-id: http://core.svn.wordpress.org/trunk@27275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 00:54:14 +00:00
Andrew Ozz
6074dfa272 Update mce-view.js and the wpview TinyMCE plugin, and use them to show gallery previews in the Visual editor, props gcorne, see #26959
Built from https://develop.svn.wordpress.org/trunk@27408


git-svn-id: http://core.svn.wordpress.org/trunk@27255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 07:01:14 +00:00
Andrew Ozz
2ccc89edfd DFW: revert adding the 'image' button, images are edited in the media modal. See #24067.
Built from https://develop.svn.wordpress.org/trunk@27391


git-svn-id: http://core.svn.wordpress.org/trunk@27239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-04 04:08:14 +00:00
Andrew Ozz
bc7ea33113 Editor: when TinyMCE is used, add autocomplete="off" to the textarea to prevent problems with missing <p> tags when the user reloads the page or uses Go Back/Go Forward buttons, and when editing the same post from two different windows. The autocomplete can be removed with the the_editor filter. Part props xsonic, fixes #27251.
Built from https://develop.svn.wordpress.org/trunk@27366


git-svn-id: http://core.svn.wordpress.org/trunk@27216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 01:15:13 +00:00
Andrew Ozz
ce7191d2f9 Editor: look at the class of the wrapper element instead of getUserSetting('editor') to determine the default editor, fixes #27257
Built from https://develop.svn.wordpress.org/trunk@27364


git-svn-id: http://core.svn.wordpress.org/trunk@27214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-02 23:26:13 +00:00
Andrew Ozz
65fac9e55a Set wpActiveEditor to the id of the first instance on init, props kovshenin, fixes #27210.
Built from https://develop.svn.wordpress.org/trunk@27270


git-svn-id: http://core.svn.wordpress.org/trunk@27126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 19:31:14 +00:00
Andrew Ozz
9c77339681 TinyMCE: revert style for the blocks drop-down in the toolbar, limit the styles imported for the same drop-down, make the menu highlight color grey. Part props avryl, see #26952
Built from https://develop.svn.wordpress.org/trunk@27193


git-svn-id: http://core.svn.wordpress.org/trunk@27052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-19 03:51:15 +00:00