Commit Graph

956 Commits

Author SHA1 Message Date
Andrew Ozz
7d2b380330 TinyMCE: initialize the floating toolbars on preinit so we can attach other events on init.
Props iseulde. Fixes #30619.
Built from https://develop.svn.wordpress.org/trunk@31732


git-svn-id: http://core.svn.wordpress.org/trunk@31713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 22:41:26 +00:00
Andrew Ozz
9c09d0ea2c TinyMCE, floating toolbars: return early if no selected element in the editor. See #30619.
Built from https://develop.svn.wordpress.org/trunk@31727


git-svn-id: http://core.svn.wordpress.org/trunk@31708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 20:08:27 +00:00
Andrew Ozz
6e14ff9234 TinyMCE:
- Abstract the code for creating floating toolbars.
- Introduce `editor.wp` namespace to hold exported methods from our plugins.
- Create the wpView toolbar(s) with the new method. This makes them work the same as the image toolbar: shortcuts, esc key, etc.
Props iseulde. See #30619.
Built from https://develop.svn.wordpress.org/trunk@31725


git-svn-id: http://core.svn.wordpress.org/trunk@31706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 19:12:28 +00:00
Andrew Ozz
eb878043a5 wpLink: change the text label to Link text, always focus the URK field, fix Ctrl/Cmd + K shortcut. See #28206.
Built from https://develop.svn.wordpress.org/trunk@31714


git-svn-id: http://core.svn.wordpress.org/trunk@31695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 03:01:27 +00:00
Andrew Ozz
9029c07592 wpLink: replace the "Title" field with a "Text" field and populate it with the link text when editing an existing link or with the selected text if any.
Props iseulde. See #28206.
Built from https://develop.svn.wordpress.org/trunk@31713


git-svn-id: http://core.svn.wordpress.org/trunk@31694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 02:40:27 +00:00
Andrew Ozz
9da43ab993 TinyMCE: Remove old placeholder functions and callbacks.
Props iseulde. Fixes #31576.
Built from https://develop.svn.wordpress.org/trunk@31703


git-svn-id: http://core.svn.wordpress.org/trunk@31684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-10 20:28:26 +00:00
Andrew Ozz
5de66d4176 TinyMCE: update to 4.1.9. Fixes #31551.
Built from https://develop.svn.wordpress.org/trunk@31700


git-svn-id: http://core.svn.wordpress.org/trunk@31681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-10 19:20:28 +00:00
Andrew Ozz
d08bb970ae TinyMCE: when pasting an URL over a selection, insert a link with the URL instead of replacing the selection with it. Props iseulde. Fixes #31571.
Built from https://develop.svn.wordpress.org/trunk@31691


git-svn-id: http://core.svn.wordpress.org/trunk@31672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 20:00:27 +00:00
Andrew Ozz
a226da32d3 TinyMCE: wpView improvements: introduce getText() and remove() methods, improved getInstance(), better docs. Props iseulde. See #31412.
Built from https://develop.svn.wordpress.org/trunk@31559


git-svn-id: http://core.svn.wordpress.org/trunk@31540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 19:32:24 +00:00
Andrew Ozz
5f27c59f49 TinyMCE: wpView improvements: remove the (obsolete) get/setViewText methods. Update stopping/pausing of multiple ME media players. Props iseulde. See #31412.
Built from https://develop.svn.wordpress.org/trunk@31548


git-svn-id: http://core.svn.wordpress.org/trunk@31529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 00:31:31 +00:00
Andrew Ozz
b799bd8e33 TinyMCE: wpView improvements:
- Better structure, simpler "view" registration, better extensibility.
- Better inline documentation.
- Don't show a placeholder for pasted link until we know the link is "embeddable'.
And many more improvements. Props iseulde. See #31412.
Built from https://develop.svn.wordpress.org/trunk@31546


git-svn-id: http://core.svn.wordpress.org/trunk@31527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 23:13:25 +00:00
Andrew Ozz
c8892dfaa2 TinyMCE: ensure the image toolbar stays visible when the image is much wider than the editor. Props iseulde, fixes #20696 for trunk.
Built from https://develop.svn.wordpress.org/trunk@31362


git-svn-id: http://core.svn.wordpress.org/trunk@31343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-06 23:00:23 +00:00
Andrew Ozz
00436f6886 TinyMCE: fix vertical positioning of the image toolbar when there are several instances of the editor. Props avryl, fixes #31028.
Built from https://develop.svn.wordpress.org/trunk@31235


git-svn-id: http://core.svn.wordpress.org/trunk@31216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-18 17:56:23 +00:00
Andrew Ozz
a7dcd2d736 TinyMCE: select the iframe element by id. Needed as some browser extensions insert extra elements in the page. Props avryl, see #30785.
Built from https://develop.svn.wordpress.org/trunk@31180


git-svn-id: http://core.svn.wordpress.org/trunk@31161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-14 21:33:25 +00:00
Andrew Ozz
d079899553 TinyMCE wpView: when clicking in the editor optimize the caret placement before or after a view. Props avryl, fixes #30938.
Built from https://develop.svn.wordpress.org/trunk@31143


git-svn-id: http://core.svn.wordpress.org/trunk@31124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-11 20:42:23 +00:00
Scott Taylor
618c5b4333 When outputting JS with a Content-Type header:
`text/javascript` is obsolete, `application/x-javascript` was experimental. `application/javascript` is the recommended type per RFC 4329.

Props sergej.mueller.
Fixes #29196.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-03 02:57:21 +00:00
Andrew Ozz
441b47b28f TinyMCE wpView: when clicking on the Edit button, move the focus back to the editor before opening the modal. This is needed for IE so TinyMCE can save the proper DOM "bookmark", and makes it possible to move the focus to the modal after it is opened.
See #30817.
Built from https://develop.svn.wordpress.org/trunk@30986


git-svn-id: http://core.svn.wordpress.org/trunk@30972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-22 21:31:26 +00:00
Andrew Nacin
8c3027c3c7 Call it 'Distraction-free writing mode' and update the help string. fixes #30657.
Built from https://develop.svn.wordpress.org/trunk@30890


git-svn-id: http://core.svn.wordpress.org/trunk@30880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-16 10:07:23 +00:00
Andrew Ozz
9f2fc255f8 TinyMCE: add another Edit translatable string for the tooltip of the Edit button on the image toolbar. Props pavelevap, see #30694.
Built from https://develop.svn.wordpress.org/trunk@30839


git-svn-id: http://core.svn.wordpress.org/trunk@30829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-13 00:47:22 +00:00
Andrew Ozz
b90c024d38 TinyMCE: remove reposition delay on showing the image toolbar. Not needed when no animation. Fixes #30670.
Built from https://develop.svn.wordpress.org/trunk@30829


git-svn-id: http://core.svn.wordpress.org/trunk@30819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-12 00:10:25 +00:00
Andrew Ozz
498c5d719c TinyMCE: return focus to the editor after closing the image toolbar. Props afercia, see #27642.
Built from https://develop.svn.wordpress.org/trunk@30775


git-svn-id: http://core.svn.wordpress.org/trunk@30765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-07 20:08:42 +00:00
Andrew Ozz
efe8fd4694 TinyMCE, improve accessibility:
- Return focus to the editor on pressing Escape while the image toolbar is focused.
- Add a Close button to the Help modal and close it on Escape.
- Override the title on the editor iframe (read by screen reader apps), replace with the Alt+Shift+H shortcut.
- Add focus shortcuts descriptions to the Help modal.
Fixes #27642.
Built from https://develop.svn.wordpress.org/trunk@30757


git-svn-id: http://core.svn.wordpress.org/trunk@30747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-06 23:53:22 +00:00
Andrew Ozz
91b8617f29 TinyMCE: manually fire ExecCommand when aligning images as we do preventDefault() on BeforeExecCommand for them. Props avryl, fixes #30565.
Built from https://develop.svn.wordpress.org/trunk@30748


git-svn-id: http://core.svn.wordpress.org/trunk@30738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-06 00:33:24 +00:00
Andrew Ozz
d16c8cf1fc TinyMCE: update the wpView toolbar to look the same as the new image toolbar.
Fixes #30561.
Built from https://develop.svn.wordpress.org/trunk@30694


git-svn-id: http://core.svn.wordpress.org/trunk@30684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-02 00:26:22 +00:00
Andrew Ozz
3ad5115eaf TinyMCE: update to 4.1.7, changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt. Fixes #30560.
Built from https://develop.svn.wordpress.org/trunk@30675


git-svn-id: http://core.svn.wordpress.org/trunk@30665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 23:28:24 +00:00
Andrew Ozz
9e8f2c7794 Editor: use the Alt+Shift+W keyboard shortcut for new DFW from both the Visual and Text editors. Props afercia, fixes #30450.
Built from https://develop.svn.wordpress.org/trunk@30593


git-svn-id: http://core.svn.wordpress.org/trunk@30583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-28 01:44:22 +00:00
Andrew Ozz
92bcf2dbcb Remove unused CSS and JS from wp-mce-help.php, see #30517.
Built from https://develop.svn.wordpress.org/trunk@30584


git-svn-id: http://core.svn.wordpress.org/trunk@30574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-26 23:23:23 +00:00
Mark Jaquith
1d3b040d7d Remove old DFW width adjustment help text.
fixes #30517
Built from https://develop.svn.wordpress.org/trunk@30582


git-svn-id: http://core.svn.wordpress.org/trunk@30572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-26 22:30:23 +00:00
Andrew Ozz
af1e417d4e Editor:
- Add CSS reset for the TinyMCE fullscreen mode when used on the Edit Post screen.
- Fix loading of the old and new DFW buttons, use another arg. passed to WP_Editors.
- Reset editor-expand when exiting TinyMCE fullscreen mode.
Fixes #30453.
Built from https://develop.svn.wordpress.org/trunk@30573


git-svn-id: http://core.svn.wordpress.org/trunk@30563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-26 02:50:24 +00:00
Dominik Schilling
61fd87f1f7 Update embedded.png after running grunt imagemin.
After [30059] and [30079] we still had four images which could be minified. Three of them are handled by [30562], the last one by this.

fixes #30141.
Built from https://develop.svn.wordpress.org/trunk@30563


git-svn-id: http://core.svn.wordpress.org/trunk@30552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-25 14:09:22 +00:00
Andrew Ozz
f3ba529c2f TinyMCE: don't hide the image toolbar when the iframe window fires onresize. There is a bug in several browsers that triggers onresize when a tooltip is shown, only in RTL mode. Also use better variable name. Fixes #30147.
Built from https://develop.svn.wordpress.org/trunk@30560


git-svn-id: http://core.svn.wordpress.org/trunk@30549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-25 04:31:23 +00:00
Andrew Ozz
20e753a8c7 TinyMCE: use the actual image node when calculating the position of the toolbar. Fixes a bug in old IE. See #30147.
Built from https://develop.svn.wordpress.org/trunk@30558


git-svn-id: http://core.svn.wordpress.org/trunk@30547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-25 01:22:21 +00:00
Andrew Ozz
c22be8dbe8 TinyMCE: change the default font size from 100% to 16px to fix some back-compat issues, fixes #30038.
Built from https://develop.svn.wordpress.org/trunk@30490


git-svn-id: http://core.svn.wordpress.org/trunk@30479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-20 22:23:24 +00:00
Andrew Nacin
87023d64b4 TinyMCE: Verify HTML in captions. props azaozz
Built from https://develop.svn.wordpress.org/trunk@30435


git-svn-id: http://core.svn.wordpress.org/trunk@30430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-20 13:49:22 +00:00
Andrew Ozz
d4a36f2c7a TinyMCE: update to the latest dev. version, 4.1.6+. Fixes #30411.
Built from https://develop.svn.wordpress.org/trunk@30397


git-svn-id: http://core.svn.wordpress.org/trunk@30393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-20 00:50:23 +00:00
Andrew Ozz
e5f57d2870 TinyMCE: fix the tooltip for 'alignnone' button on the image toolbar. Props johnbillion, see #30147.
Built from https://develop.svn.wordpress.org/trunk@30385


git-svn-id: http://core.svn.wordpress.org/trunk@30382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-19 17:27:22 +00:00
Andrew Ozz
69b529024a Fix typo in [30361], see #30147.
Built from https://develop.svn.wordpress.org/trunk@30362


git-svn-id: http://core.svn.wordpress.org/trunk@30361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-16 23:15:23 +00:00
Andrew Ozz
22b760088c TinyMCE: don't show image toolbar for placeholder images. See #30147.
Built from https://develop.svn.wordpress.org/trunk@30361


git-svn-id: http://core.svn.wordpress.org/trunk@30360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-16 23:12:22 +00:00
Andrew Ozz
b3e14b36ff TinyMCE: fix the cursor appearance while it is outside the editor body. Props miyauchi, fixes #30112.
Built from https://develop.svn.wordpress.org/trunk@30349


git-svn-id: http://core.svn.wordpress.org/trunk@30348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-15 01:21:22 +00:00
Mark Jaquith
7c4b9419f4 Introduce Distraction-Free Writing v2, a re-think of DFW that uses the main editor instance
* the "DFW" button is now an auto/off toggle
* defaulting to auto during beta, decide later for release
* "auto" means that DFW gets enabled as you start typing in editor
* tabbing and mousing out will bring the full interface back
* there is a slight grace period during which your mouse can quickly return

Feature plugin work happened here: https://github.com/avryl/focus

props avryl, azaozz, Michael Arestad
fixes #29806
Built from https://develop.svn.wordpress.org/trunk@30338


git-svn-id: http://core.svn.wordpress.org/trunk@30337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-13 22:31:22 +00:00
Andrew Ozz
69105d29e8 TinyMCE: enhance the inline toolbar for images:
- Add alignment (left, center, right, none) buttons.
- Position the menu above the image when possible, except on iOS.
- Fix selecting images on iOS.
First run, part props avryl. See #30147.
Built from https://develop.svn.wordpress.org/trunk@30318


git-svn-id: http://core.svn.wordpress.org/trunk@30317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-13 00:56:22 +00:00
Aaron Jorbin
2261f4ceb4 Update images based on grunt imagemin
The new version of imagemin that was added in r30059 condenses some images more.

see #30141


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


git-svn-id: http://core.svn.wordpress.org/trunk@30079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-28 22:02:22 +00:00
Andrew Ozz
4dfe796cd2 TinyMCE: update to 4.1.6+. Adds support for cache-busting when auto-loading JS and CSS. Change the tests to run in /build. Changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt.
Fixes #30079
Built from https://develop.svn.wordpress.org/trunk@29994


git-svn-id: http://core.svn.wordpress.org/trunk@29735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-23 02:08:20 +00:00
Andrew Ozz
4c81e264e8 TinyMCE: update the default styles: make the font size larger and make it the same size in tables. Fixes #30038
Built from https://develop.svn.wordpress.org/trunk@29986


git-svn-id: http://core.svn.wordpress.org/trunk@29728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-21 23:06:18 +00:00
Andrew Ozz
912ffccdf6 TinyMCE: fix the 'wpgallery' plugin to use a placeholder for galleries when either the 'wpview' plugin or wp.mce is not loaded. Fixes #28756
Built from https://develop.svn.wordpress.org/trunk@29883


git-svn-id: http://core.svn.wordpress.org/trunk@29639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-12 18:13:20 +00:00
Sergey Biryukov
d7de59cb00 Use Tahoma for RTL in general and Arial for Hebrew in editor styles.
fixes #29553.
Built from https://develop.svn.wordpress.org/trunk@29773


git-svn-id: http://core.svn.wordpress.org/trunk@29545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-27 11:10:16 +00:00
Andrew Ozz
ab1c46af42 TinyMCE wpView: when pasting/inserting content before a view, add new paragraph above it and insert the content there. Props avryl, fixes #29380 for trunk.
Built from https://develop.svn.wordpress.org/trunk@29766


git-svn-id: http://core.svn.wordpress.org/trunk@29538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-26 00:21:16 +00:00
Andrew Ozz
6592e13cae TinyMCE: fix image captions regexp when wpautop is disabled in wp_editor(). Fixes #29592 for trunk.
Built from https://develop.svn.wordpress.org/trunk@29730


git-svn-id: http://core.svn.wordpress.org/trunk@29504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-10 23:03:18 +00:00
Andrew Ozz
2d3eea5ab2 TinyMCE: fix the 'tabfocus' plugin to check if default is prevented on pressing tab, bind the events later so other plugins can cancel them. Merged upstream in 86098b3485 together with another change.
Fixes #29430
Built from https://develop.svn.wordpress.org/trunk@29657


git-svn-id: http://core.svn.wordpress.org/trunk@29431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-01 19:03:16 +00:00
Helen Hou-Sandí
c392ff6f90 Editor scrolling: reduce the amount of height jumping on load.
props avryl.
fixes #29307.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-26 18:39:17 +00:00
Scott Taylor
149346ff6e MCE View sandboxes:
* Use a `MutationObserver` to listen to the `body` class of the parent editor frame.
* In `wpview_media_sandbox_styles()`, only return the MEjs stylesheets.
* In `wp_ajax_parse_media_shortcode()` and `wp_ajax_parse_embed()`, return an object instead of an HTML blob to allow passing `body` and `head` separately	

Props avryl, azaozz.
Fixes #29048.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-26 04:46:15 +00:00
Andrew Ozz
a2ad27c03e TinyMCE wpView: exclude more non-printable keyCodes in isSpecialKey(), fixes #29115
Built from https://develop.svn.wordpress.org/trunk@29606


git-svn-id: http://core.svn.wordpress.org/trunk@29380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-25 20:41:16 +00:00
Andrew Ozz
f2c881cf3b TinyMCE: update to 4.1.4-20140822. Changes:
- Fixed bug where sometimes the resize rectangles wouldn't properly render on images on WebKit/Blink. 9a2d01cc14
- Fixed nodeChanged selection issue where the image selection wouldn't be removed if you clicked right after/before it. dd729c67e0
- Fixed bug in list plugin where delete/backspace would merge empty LI elements in lists incorrectly. caadfb05dd
See #29310
Built from https://develop.svn.wordpress.org/trunk@29576


git-svn-id: http://core.svn.wordpress.org/trunk@29350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-22 17:44:16 +00:00
Andrew Ozz
c3c20549c5 TinyMCE: update to 4.1.4. Changelog: http://www.tinymce.com/develop/changelog/?type=tinymce. Fixes #29310
Built from https://develop.svn.wordpress.org/trunk@29570


git-svn-id: http://core.svn.wordpress.org/trunk@29344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-21 23:53:18 +00:00
Andrew Ozz
342a8ce6a6 TinyMCE wpView: scale iframes to 100% width and ensure they have transparent background. See #29048.
Built from https://develop.svn.wordpress.org/trunk@29545


git-svn-id: http://core.svn.wordpress.org/trunk@29321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-19 22:43:16 +00:00
Andrew Ozz
228c77ca2f TinyMCE: fix the keycode check when removing the Edit/Delete toolbar from images on keydown, see #28705
Built from https://develop.svn.wordpress.org/trunk@29541


git-svn-id: http://core.svn.wordpress.org/trunk@29317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-19 19:14:16 +00:00
Andrew Ozz
28bcbcb972 Fix typo in the 'wpeditimage' plugin, see #28705
Built from https://develop.svn.wordpress.org/trunk@29540


git-svn-id: http://core.svn.wordpress.org/trunk@29316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-19 18:43:20 +00:00
Andrew Ozz
542e56ac3f TinyMCE wpView: remove CSS transition for the fake caret. Can have very annoying side effect: the whole page shifts a bit. See #28595.
Built from https://develop.svn.wordpress.org/trunk@29536


git-svn-id: http://core.svn.wordpress.org/trunk@29312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-19 03:57:17 +00:00
Andrew Ozz
74f6ddc816 TinyMCE wpView: ignore more keys when the caret is around a view. Part props avryl, fixes #29115.
Built from https://develop.svn.wordpress.org/trunk@29535


git-svn-id: http://core.svn.wordpress.org/trunk@29311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-19 03:27:17 +00:00
Andrew Ozz
c0fef55a47 DFW: revert applying the Visual editor body color and background-color for now. Set the color to #333 and the background to transparent. Fixes #28330.
Built from https://develop.svn.wordpress.org/trunk@29533


git-svn-id: http://core.svn.wordpress.org/trunk@29309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-18 18:23:16 +00:00
Scott Taylor
36e4e9917b wpviews: whenever a view is updated or inserted, don't refresh ALL of the views.
Props avryl.
Fixes #28788.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-18 03:59:17 +00:00
Andrew Ozz
aff2892646 TinyMCE: fix the edit image and wpview buttons on touch screen PCs, fixes #29235.
Built from https://develop.svn.wordpress.org/trunk@29521


git-svn-id: http://core.svn.wordpress.org/trunk@29297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-17 20:11:15 +00:00
Andrew Ozz
2f4bd918b2 TinyMCE: fix the 'editimage' plugin for touch devices. Better attempt to hide the onscreen keyboard when the media modal opens and TinyMCE is in focus. See #28595, #29166
Built from https://develop.svn.wordpress.org/trunk@29471


git-svn-id: http://core.svn.wordpress.org/trunk@29249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-12 04:27:18 +00:00
Andrew Ozz
e75033f21b TinyMCE: update wpview and editimage plugins for 4.1.3. Add show/hide of the Edit and Delete buttons on views and images on 'touchend'. See #28595, #29166
Built from https://develop.svn.wordpress.org/trunk@29463


git-svn-id: http://core.svn.wordpress.org/trunk@29241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-10 04:22:15 +00:00
Andrew Ozz
efd52cb860 TinyMCE: update to 4.1.3, changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt, fixes #29166
Built from https://develop.svn.wordpress.org/trunk@29458


git-svn-id: http://core.svn.wordpress.org/trunk@29236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-09 20:56:15 +00:00
Andrew Ozz
13aee01e2b TinyMCE: don't access the parent window when opening the (iframe based) Help/Keyboard Shortcuts modal. Fixes #20094.
Built from https://develop.svn.wordpress.org/trunk@29449


git-svn-id: http://core.svn.wordpress.org/trunk@29227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-08 21:18:16 +00:00
Andrew Ozz
b61903f2bb TinyMCE: add support for class attribute on the caption shortcode. Part props knutsp, kadamwhite, fixes #28951.
Built from https://develop.svn.wordpress.org/trunk@29380


git-svn-id: http://core.svn.wordpress.org/trunk@29158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-06 00:58:16 +00:00
Andrew Ozz
666fec5144 TinyMCE: fix alignment buttons when used on image with caption. Remove old/unneeded code. Fixes #28705.
Built from https://develop.svn.wordpress.org/trunk@29370


git-svn-id: http://core.svn.wordpress.org/trunk@29148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-04 00:52:17 +00:00
Mark Jaquith
61a0551529 Match background color in DFW and adapt the dashed outline color.
fixes #28330. props avryl, ipstenu.
Built from https://develop.svn.wordpress.org/trunk@29340


git-svn-id: http://core.svn.wordpress.org/trunk@29120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-01 18:10:16 +00:00
Andrew Ozz
b9886e92e3 Editor scrolling:
- Add a Screen Option to turn it on/off, and on()/off() methods from JS. Store the user preference.
- Fix delayed calls to resize() in the TinyMCE autoresize plugin.
See #28328.
Built from https://develop.svn.wordpress.org/trunk@29336


git-svn-id: http://core.svn.wordpress.org/trunk@29116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-01 02:43:17 +00:00
Andrew Ozz
c8cec032ae TinyMCE:
- Use `data-wp-*` for processing and styling of the `more` and `nextpage` placeholders, keep the class names for back-compat. Makes them "immune" to "Clear formatting".
- Translate the titles of the placeholders.
Fixes #28772.
Built from https://develop.svn.wordpress.org/trunk@29317


git-svn-id: http://core.svn.wordpress.org/trunk@29098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-28 23:45:18 +00:00
Andrew Ozz
b9f97e8352 TinyMCE:
- Fix complex character input in Japanese, Chinese, etc. Was broken in getCursorOffset() in editor-expand.js.
- Disable auto-scrolling in some edge cases when editor expanding is enabled.
See #28328.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-26 00:08:19 +00:00
Andrew Ozz
9436186ee4 TinyMCE wpView:
- Fix opening the media modal on clicking Edit in Firefox.
- Fix range errors when restoring the selection bookmark in IE11 after editing a view.
See #28595.
Built from https://develop.svn.wordpress.org/trunk@29298


git-svn-id: http://core.svn.wordpress.org/trunk@29080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-25 00:56:15 +00:00
Andrew Ozz
da0b98a8f0 Editor scrolling:
- Improve TinyMCE resizing when a floated block is at the end of the content.
- Improve setting the padding/margin under the toolbar on loading.
- Add custom event on TinyMCE resizing and use it to adjust the pinning (if needed).
Part props avryl, see #28328.
Built from https://develop.svn.wordpress.org/trunk@29279


git-svn-id: http://core.svn.wordpress.org/trunk@29061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-24 01:33:15 +00:00
Andrew Ozz
8e973f2c29 wpView: make sure the editor is focused before selecting/deselecting a view, or IE may throw an invalid range error, see #28595.
Built from https://develop.svn.wordpress.org/trunk@29273


git-svn-id: http://core.svn.wordpress.org/trunk@29055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-22 21:53:16 +00:00
Andrew Ozz
b9222c9e1e TinyMCE: include 85e22b58e9that and quote one more use of "float". This is "reserved as future keyword by older ECMAScript specifications" according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar and can throw a syntax error. See #28576.
Built from https://develop.svn.wordpress.org/trunk@29261


git-svn-id: http://core.svn.wordpress.org/trunk@29044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-21 23:05:15 +00:00
Andrew Ozz
16696e9ea8 TinyMCE wpView: better removal of views, replace a selected view when pasting. Props avryl, fixes #28913.
Built from https://develop.svn.wordpress.org/trunk@29246


git-svn-id: http://core.svn.wordpress.org/trunk@29030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-19 07:30:15 +00:00
Andrew Ozz
47b735b0e4 TinyMCE wpVIew: use CSS3 currentcolor for the fake carets, see #28595.
Built from https://develop.svn.wordpress.org/trunk@29245


git-svn-id: http://core.svn.wordpress.org/trunk@29029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-19 06:29:14 +00:00
Andrew Ozz
1d637d85e0 TinyMCE wpView:
- Typing something replaces a selected view.
- Pressing backspace deletes the selection.
- Pressing enter also deletes the selection.
- Pasting something replaces the selection.
- Also merge the different 'keydown' handlers.
Props avryl, fixes #28913.
Built from https://develop.svn.wordpress.org/trunk@29236


git-svn-id: http://core.svn.wordpress.org/trunk@29020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-19 00:34:15 +00:00
Andrew Ozz
5c5c73b50e TinyMCE: add the 'colorpicker' and 'lists' plugins, fixes #28939, #27359.
Built from https://develop.svn.wordpress.org/trunk@29214


git-svn-id: http://core.svn.wordpress.org/trunk@28998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-17 21:54:14 +00:00
Andrew Ozz
4361a40427 TinyMCE: include 709266e308 that fixes the UI state updates for the "link" button. See #28576.
Built from https://develop.svn.wordpress.org/trunk@29211


git-svn-id: http://core.svn.wordpress.org/trunk@28995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-17 19:31:14 +00:00
Andrew Ozz
95735cf298 TinyMCE:
- Update to 4.1.2, changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt
- Update the tests to 4.1.2.
Fixes #28576.
Built from https://develop.svn.wordpress.org/trunk@29203


git-svn-id: http://core.svn.wordpress.org/trunk@28987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-17 00:59:16 +00:00
Andrew Ozz
1637f1617f TinyMCE: fix aligncenter for html5-captions, props obenland, fixes #28681.
Built from https://develop.svn.wordpress.org/trunk@29195


git-svn-id: http://core.svn.wordpress.org/trunk@28979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-16 21:28:16 +00:00
Andrew Ozz
7f7c3fb54f TinyMCE wpView: add noop() when returning early, fixes #28921
Built from https://develop.svn.wordpress.org/trunk@29190


git-svn-id: http://core.svn.wordpress.org/trunk@28974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-16 17:55:16 +00:00
Andrew Ozz
e400129cd8 Editor scrolling: on setcontent, resize the editor after some delay to allow the browser to render the content. Props avryl, see #28328.
Built from https://develop.svn.wordpress.org/trunk@29185


git-svn-id: http://core.svn.wordpress.org/trunk@28969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-16 02:30:15 +00:00
Andrew Ozz
5bef617d04 TinyMCE wpView: handle execCommand when the "fake caret" P is selected, props avryl, see #28595
Built from https://develop.svn.wordpress.org/trunk@29184


git-svn-id: http://core.svn.wordpress.org/trunk@28968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-16 02:19:15 +00:00
Andrew Ozz
c6afe2dd3e TinyMCE wpView:
- Cast off commands targeted to a view except undo, redo, RemoveFormat and mceToggleFormat (bold, italic, etc.).
- Disable the link and unlink buttons when a view is selected.
Props avryl, see #28595
Built from https://develop.svn.wordpress.org/trunk@29183


git-svn-id: http://core.svn.wordpress.org/trunk@28967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-16 00:10:17 +00:00
Andrew Ozz
5f54195855 TinyMCE wpView: remove unused code, props avryl, see #28595
Built from https://develop.svn.wordpress.org/trunk@29182


git-svn-id: http://core.svn.wordpress.org/trunk@28966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-15 23:39:15 +00:00
Scott Taylor
89d9bbd7f6 Make audio and video URLs/embed handlers work in <iframe>-sandbox'd MCE views.
Introduce:
`get_editor_stylesheets()`
`wp_media_mce_styles()`.

See #28905.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-15 21:51:15 +00:00
Andrew Ozz
fa53f86393 TinyMCE wpView: better handling of the Enter key, props avryl, see #28595
Built from https://develop.svn.wordpress.org/trunk@29127


git-svn-id: http://core.svn.wordpress.org/trunk@28912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-13 00:34:15 +00:00
Andrew Ozz
3282885519 TinyMCE wpView: fix selecting views on click, part props avryl, see #28595
Built from https://develop.svn.wordpress.org/trunk@29126


git-svn-id: http://core.svn.wordpress.org/trunk@28911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-12 22:51:15 +00:00
Andrew Ozz
1c55723a16 Fix whitespace, quotes and double patch content in wpautoresize plugin, see #28328
Built from https://develop.svn.wordpress.org/trunk@29050


git-svn-id: http://core.svn.wordpress.org/trunk@28838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-09 22:43:14 +00:00
Andrew Ozz
5e4a020ff8 Enhance the editor on the Add/Edit Post screens, first run. Props avril, see #28328.
Built from https://develop.svn.wordpress.org/trunk@29049


git-svn-id: http://core.svn.wordpress.org/trunk@28837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-09 22:06:15 +00:00
Helen Hou-Sandí
a180b44763 Display plugin install results as "cards" rather than in a list table, first run.
props stephdau, ryelle, tellyworth, melchoyce. see #28785, #28646.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-09 20:02:14 +00:00
Andrew Ozz
2f4b08860b TinyMCE wpView: remove leftover/unused bits, see #28567.
Built from https://develop.svn.wordpress.org/trunk@29038


git-svn-id: http://core.svn.wordpress.org/trunk@28826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-08 22:56:14 +00:00
Andrew Ozz
00ff787a86 TinyMCE wpView:
- Improve the fake caret hide/show.
- Improve getView() speed.
- Add callback for showing the proper path when a view is selected. This currently doesn't work, will start working after we update TinyMCE.
props avryl, see #28567, #28595.
Built from https://develop.svn.wordpress.org/trunk@29022


git-svn-id: http://core.svn.wordpress.org/trunk@28810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-08 04:15:14 +00:00
Andrew Ozz
93170e58fa TinyMCE wpView:
- Add loadingPlaceholder() that returns some html to use as placeholder while the view is loading. Includes a subtle CSS based loading animation.
- Fix setContent(), it should empty the element before appending the new node.
- Change getHtml() to always return a string.
Fixes #28761.
Built from https://develop.svn.wordpress.org/trunk@29019


git-svn-id: http://core.svn.wordpress.org/trunk@28807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-07 22:41:15 +00:00
Drew Jaynes
9ef7c41a15 Inline docs syntax fixes following [28978].
See #28740.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-07 16:42:16 +00:00
Andrew Ozz
bf9908b37f TinyMCE wpView:
- When a view is selected, pressing the up or down arrow key should move the caret to the block above or below the view.
- Selecting some text that touches the view and deleting it should not remove part of the view.
- Show/hide the "fake" carets on editor focus/blur.
- Don't create new paragraphs before or after a view on pressing the arrow keys or delete key. Paragraphs are created on pressing Enter.
Props avryl, see #28595.
Built from https://develop.svn.wordpress.org/trunk@29010


git-svn-id: http://core.svn.wordpress.org/trunk@28798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-07 01:21:15 +00:00
Andrew Ozz
e4fb3e7695 Remove debug remnants, see #28595
Built from https://develop.svn.wordpress.org/trunk@29004


git-svn-id: http://core.svn.wordpress.org/trunk@28792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-05 00:25:14 +00:00
Andrew Ozz
fb559a8095 TinyMCE: improve the way wpViews work. Add two paragraphs and capture the caret in them on clicking before/after/left/right of a view or moving the caret with the arrow keys, then show a "fake" caret.
This makes it much more "natural" to move the caret with the arrow keys and to add paragraphs before a view when it is the first element or after a view when it's last.

Props avryl, see #28595.
Built from https://develop.svn.wordpress.org/trunk@28994


git-svn-id: http://core.svn.wordpress.org/trunk@28782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 03:59:15 +00:00
Andrew Nacin
b35982cbff Simplify the setup-config.php UI flow and load process.
When no configuration file is detected, we now redirect to setup-config.php. This process now uses the WordPress bootstrap, rather than a set of fragile hacks.

fixes #28740.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 19:57:14 +00:00
Andrew Ozz
99c9ef1a59 TinyMCE:
- Update the 'paste' plugin including cb36a78e54
- Better filtering of WebKit inserted &nbsp.
- Remove empty paragraphs and all inline styles on pasting but preserve styles added in the editor. This brings back the WP 3.8 behavior and makes pasting in all browsers work the same.
See #28016
Built from https://develop.svn.wordpress.org/trunk@28932


git-svn-id: http://core.svn.wordpress.org/trunk@28730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-30 21:55:18 +00:00
Andrew Ozz
db501d7f72 TinyMCE: force 'font-weight: bold` for <strong> and <b> inside the editor or Chrome and Safari may replace them with spans on pasting. Fixes #28656.
Built from https://develop.svn.wordpress.org/trunk@28866


git-svn-id: http://core.svn.wordpress.org/trunk@28666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-27 03:00:15 +00:00
Andrew Ozz
c936468da1 TinyMCE: revert 158b742410 and 576fa77aa2 as they may cause selection restore problems in old IE. See #28391.
Built from https://develop.svn.wordpress.org/trunk@28795


git-svn-id: http://core.svn.wordpress.org/trunk@28608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-21 01:15:15 +00:00
Andrew Ozz
46f17ee039 TinyMCE: update to 4.0.28+. Includes all changes until 09-06-2014: 32cb108d41. Changelog: 32cb108d41/changelog.txt.
See #28391.
Built from https://develop.svn.wordpress.org/trunk@28768


git-svn-id: http://core.svn.wordpress.org/trunk@28581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-17 23:49:15 +00:00
Andrew Ozz
5b4943bc6a TinyMCE wpView: fix selecting all of view's "text" in Safari, props avryl, fixes #28088
Built from https://develop.svn.wordpress.org/trunk@28755


git-svn-id: http://core.svn.wordpress.org/trunk@28569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-16 00:12:15 +00:00
Andrew Ozz
84f3e30f7b wpView: improve handling of embed errors/error messages, see #28195
Built from https://develop.svn.wordpress.org/trunk@28754


git-svn-id: http://core.svn.wordpress.org/trunk@28568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-15 22:53:16 +00:00
Andrew Ozz
f88149c370 wpView:
- Don't wrap single-line URLs in [embed]. Use them directly in generating a view.
- If the embedding HTML contains a script, "sandbox" it in an iframe to prevent it from changing the editor DOM.
- Automatically add toolbar and overlay when needed.
- Try to embed single-line URLs only if they are pasted in an empty paragraph.
Props avryl, see #28195
Built from https://develop.svn.wordpress.org/trunk@28748


git-svn-id: http://core.svn.wordpress.org/trunk@28562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-12 02:49:16 +00:00
Andrew Ozz
fbdb89b89a wpView: fix deselecting a view when clicking outside the iframe body. Props avryl, fixes #28268
Built from https://develop.svn.wordpress.org/trunk@28687


git-svn-id: http://core.svn.wordpress.org/trunk@28505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-06 05:04:14 +00:00
Andrew Ozz
23b0443578 wpView: fire a nodeChanged event after selecting a view so the editor UI gets updated. Props avryl, fixes #28385
Built from https://develop.svn.wordpress.org/trunk@28686


git-svn-id: http://core.svn.wordpress.org/trunk@28504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-06 04:43:17 +00:00
Andrew Ozz
a59cf45c4d TinyMCE: remove &nbsp from empty paragraphs inside the visual editor, props avryl, fixes #28282
Built from https://develop.svn.wordpress.org/trunk@28685


git-svn-id: http://core.svn.wordpress.org/trunk@28503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-06 04:20:14 +00:00
Andrew Ozz
60e323d911 wpView: use data-mce-selected instead of adding a class to mark a view as selected. This prevents adding an unneeded undo level. Props avryl, fixes #28313
Built from https://develop.svn.wordpress.org/trunk@28684


git-svn-id: http://core.svn.wordpress.org/trunk@28502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-06 02:12:14 +00:00
Andrew Ozz
15a1f80885 TinyMCE in iOS:
- Fix placing the caret at the bottom of longer posts when the keyboard is open.
- Disable resizing on switching editors and on show/hide the kitchen sink row.
See #28242
Built from https://develop.svn.wordpress.org/trunk@28626


git-svn-id: http://core.svn.wordpress.org/trunk@28446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-30 02:38:16 +00:00
Andrew Ozz
1e8b5ef008 TinyMCE: remove margins from the image toolbar wrapper, props avryl, fixes #28389
Built from https://develop.svn.wordpress.org/trunk@28624


git-svn-id: http://core.svn.wordpress.org/trunk@28445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-29 22:59:14 +00:00
Andrew Ozz
e518fda253 Regex should be non-greedy, see #28389
Built from https://develop.svn.wordpress.org/trunk@28615


git-svn-id: http://core.svn.wordpress.org/trunk@28439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-29 07:56:14 +00:00
Andrew Ozz
500bfe7a54 TinyMCE: fix problems with undo/redo after resizing an image several times. Fixes #28389.
Built from https://develop.svn.wordpress.org/trunk@28614


git-svn-id: http://core.svn.wordpress.org/trunk@28438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-29 07:51:14 +00:00
Andrew Ozz
c4243e53d0 TinyMCE: update to 4.0.28. Also includes 43fff5b453. Part-props avryl for the patch on #27941, fixes #28391, #27941.
Built from https://develop.svn.wordpress.org/trunk@28606


git-svn-id: http://core.svn.wordpress.org/trunk@28430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-29 00:59:15 +00:00
Andrew Ozz
1ba1b3ec29 TinyMCE: fix saving the editor content on switching Visual -> Text, fixes #28353
Built from https://develop.svn.wordpress.org/trunk@28576


git-svn-id: http://core.svn.wordpress.org/trunk@28401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-25 22:47:13 +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 Ozz
8bc84c0441 wpView: fix selecting a view's text string in Safari, props gcorne, fixes #28088
Built from https://develop.svn.wordpress.org/trunk@28565


git-svn-id: http://core.svn.wordpress.org/trunk@28391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-23 20:56:14 +00:00
Andrew Ozz
f184243aa3 DFW: fix closing only the wpLink or media modal when pressing Esc.
Built from https://develop.svn.wordpress.org/trunk@28455


git-svn-id: http://core.svn.wordpress.org/trunk@28282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-16 18:17:14 +00:00
Sergey Biryukov
abc830ca9d DFW: Properly handle Esc key when the content is focused or when switching browser tabs.
props avryl.
fixes #28279.
Built from https://develop.svn.wordpress.org/trunk@28443


git-svn-id: http://core.svn.wordpress.org/trunk@28270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-16 10:43:14 +00:00
Scott Taylor
f22beb987c First pass at wpview logic for the [embed] shortcode. URLs on a their own line are parsed as well. The toolbar will appear with the "remove" button when the view is clicked. Edit has not been implemented yet.
Props avryl, wonderboymusic.
See #28195.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-10 23:36:18 +00:00
Andrew Ozz
5de05f97dd TinyMCE: update the 'paste' plugin to the latest dev. version. Included changes: 1b7c41cd7b and 7998b8025d. See #27909, for trunk.
Built from https://develop.svn.wordpress.org/trunk@28192


git-svn-id: http://core.svn.wordpress.org/trunk@28022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-24 00:59:13 +00:00
Andrew Ozz
7b4d339454 TinyMCE: when adding a caption to an image that is in a paragraph with other text, move the caption node above the paragraph instead of below. See #27922, for trunk.
Built from https://develop.svn.wordpress.org/trunk@28190


git-svn-id: http://core.svn.wordpress.org/trunk@28020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-23 20:42:14 +00:00
Andrew Ozz
3eb1616925 Drag/drop on the editor to upload: don't trigger the uploader when selected test is being dragged from one window to another. See #27880, for trunk.
Built from https://develop.svn.wordpress.org/trunk@28189


git-svn-id: http://core.svn.wordpress.org/trunk@28019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-23 20:35:13 +00:00
Andrew Ozz
f81a107cee TinyMCE: fix the "active" state of the Link button when an image wrapped in a link is selected, see #27847, for trunk.
Built from https://develop.svn.wordpress.org/trunk@28185


git-svn-id: http://core.svn.wordpress.org/trunk@28016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-22 21:11:14 +00:00
Scott Taylor
0b1272e445 Persisting <track> elements as the body of a [video] shortcode in MCE Views:
* When generating the view's HTML, ensure that the shortcode's `content` is added to the model
* Add a `PostProcess` event in the `wpview` plugin to properly return the shortcode when the editor mode is toggled, ensuring that elements in the body are not dropped.

Props azaozz, wonderboymusic.
See #27915.



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


git-svn-id: http://core.svn.wordpress.org/trunk@28014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-22 18:21:16 +00:00
Andrew Nacin
a6eedd18b2 TinyMCE: Restore old wordpress_adv_hidden editor parameter to enable force-showing the kitchen sink.
props azaozz.
see #27963, for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-22 13:50:14 +00:00
Andrew Nacin
a8cefa836d Graceful failures for TinyMCE views of video/audio playlists.
props gcorne.
fixes #27821.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-16 00:23:15 +00:00
Andrew Ozz
0df02eb8ea Add hooks to the wpeditimage tinymce plugin and to the image details portion of the media modal.
- Add wp.media.events which is intended to be a global media event bus.
- Add a post-render event to the ImageDetails view that third-party code can leverage to add subviews.
- Performance improvement for the initialization of the PostImage model.
- A bit more markup to the image details template to make it easier to add a view to the advanced options.
Props gcorne, fixes #27698
Built from https://develop.svn.wordpress.org/trunk@28095


git-svn-id: http://core.svn.wordpress.org/trunk@27926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-13 04:02: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 Ozz
1a538353fc Update the TinyMCE paste plugin to the latest development version. It includes a fix for pasting from Word: removes inline comments and change tracking.
Changeset: f8cffdf342
Fixes #27771
Built from https://develop.svn.wordpress.org/trunk@28089


git-svn-id: http://core.svn.wordpress.org/trunk@27920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-12 20:01:14 +00:00
Andrew Ozz
191dd168c1 TinyMCE wpViews:
- Prevent undo steps from being added when the body of a wpview changes.
- Add unbind() to handle cleanup on DOM rebuilding in TinyMCE.
- Ensure that MediaElement's cleanup routine is run on every player in all instances of the editor.
- Initialize the players after some delay to ensure CSS is loaded.
Props gcorne and wonderboymusic, fixes #27389
Built from https://develop.svn.wordpress.org/trunk@28084


git-svn-id: http://core.svn.wordpress.org/trunk@27915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-12 00:46:14 +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 Ozz
c631d144f1 Update TinyMCE to the current development version, 4.0.21.1. Fixes #27744
Built from https://develop.svn.wordpress.org/trunk@28066


git-svn-id: http://core.svn.wordpress.org/trunk@27898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-10 21:09:16 +00:00
Andrew Ozz
a3c725f5b4 TinyMCE Views in IE8 and 7: change deselect event only for old IE, props gcorne, fixes #27546
Built from https://develop.svn.wordpress.org/trunk@28063


git-svn-id: http://core.svn.wordpress.org/trunk@27895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-09 15:29:17 +00:00
Andrew Ozz
cc694bac21 Fix TinyMCE Views in IE8 and 7:
- Add fallback background images for dashicons.
- Fix hiding the clipboard while still allowing the contents to be selected.
- Work around lack of border-box in gallery styles.
(Includes precommit cleanup for theme.js)
Props gcorne, fixes 27546
Built from https://develop.svn.wordpress.org/trunk@28062


git-svn-id: http://core.svn.wordpress.org/trunk@27894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-09 00:58:15 +00:00
Andrew Ozz
fd0ae7e406 Precommit cleanup for theme.js, editor.css amd wpdialogs/plugin.js, See #27055, #26907, #16284
Built from https://develop.svn.wordpress.org/trunk@28045


git-svn-id: http://core.svn.wordpress.org/trunk@27875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 08:29: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 Nacin
64936ec9b5 TinyMCE help: Break up strings changed in [28027] for ease of changing later.
Restores a not inaccurate paragraph to reduce churn.

see #27100.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 01:19:15 +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
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
df7b16dda1 TinyMCE: show an error in the console when a plugin attempts to use the 'wpdialogs' plugin but wpdialog.js is not enqueued, fixes #16284
Built from https://develop.svn.wordpress.org/trunk@28012


git-svn-id: http://core.svn.wordpress.org/trunk@27842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 21:35:15 +00:00
Scott Taylor
2c88f6e941 [27640] supported a caption for audio and video shortcodes as part of a UX iteration for the related MCE views. These captions have since be excluded, so the extra code should be removed (it was there for this sole reason).
See #27320.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 06:13:18 +00:00
Dominik Schilling
f8d4a00b6a Update TinyMCE help for pasting content.
props chiragswadia.
see #27100.
Built from https://develop.svn.wordpress.org/trunk@27972


git-svn-id: http://core.svn.wordpress.org/trunk@27802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-06 19:46:15 +00:00
Andrew Ozz
e392b42c70 TinyMCE: update the default style for html5-captions, props obenland fixes #26642
Built from https://develop.svn.wordpress.org/trunk@27949


git-svn-id: http://core.svn.wordpress.org/trunk@27779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-04 23:12:16 +00:00
Andrew Ozz
d4755ebea3 TinyMCE: add image backgrounds for more and nextpage tags (also jshint fix for theme.js). Fixes #27106
Built from https://develop.svn.wordpress.org/trunk@27944


git-svn-id: http://core.svn.wordpress.org/trunk@27774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-04 05:23:14 +00:00
Andrew Ozz
a3650b68cd Edit image modal:
- Make the calculation of the aspect ratio more robust.
- Better getting of the image height and width.
Props gcorne, see #27366
Built from https://develop.svn.wordpress.org/trunk@27942


git-svn-id: http://core.svn.wordpress.org/trunk@27772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-04 01:49:15 +00:00
Andrew Ozz
0ee57f8f88 TinyMCE: improve setting disabled/enabled/activated states on the Unlink button, fixes #27309
Built from https://develop.svn.wordpress.org/trunk@27934


git-svn-id: http://core.svn.wordpress.org/trunk@27764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-03 20:05:31 +00:00
Andrew Ozz
a2e1d9f4c8 Edit Image modal:
- Fix issue with adding a link to an image that didn't have one previously.
- Adjust the look-and-feel of the advance options toggle so that it becomes a section heading that can be open/closed.
- Add a Custom Size option to the size drop-down that reveals fields for soft-resizing the image inserted into the post.
Props gcorne, and props sdasse for the design help, see #27366
Built from https://develop.svn.wordpress.org/trunk@27918


git-svn-id: http://core.svn.wordpress.org/trunk@27748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-03 03:21: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
c7eb5e7f1f Gallery preview: add a "No items found" state which is displayed when rendering the gallery wpview and no attachments are found. Props gcorne, fixes #27558
Built from https://develop.svn.wordpress.org/trunk@27899


git-svn-id: http://core.svn.wordpress.org/trunk@27730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-02 02:18:15 +00:00
Andrew Ozz
56ede0bad7 Edit Image modal:
- Move all advanced options under a single “Show advanced options” toggle that mirrors the behavior and look-and-feel of the wplink modal.
- Switch to using <select> for the Size and Link To.
- Bring back the field for CSS Class for the image, but don’t incorporate the internally managed WordPress classes (size-, wp-image-, etc…).
- On larger screen sizes, float labels to the left. When the width drops below 900px, stack the label above the fields.
- Keep image at top on screen sizes where the two columns are stacked into a single column.
- Don't replace the nodes in the editor DOM so we don't stomp on any custom attributes that the user may have added via the Text editor or some other mechanism.
Props gcorne, see #27366
Built from https://develop.svn.wordpress.org/trunk@27898


git-svn-id: http://core.svn.wordpress.org/trunk@27729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-02 01:54:15 +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
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
Andrew Ozz
60435c4143 Edit Image modal:
- Bring back some of the advanced settings.
- Make the layout two-column for wider screens, remove the sidebar, and shrink the modal a bit.
- The image reflects the size as inserted in the post as long as it doesn't overflow the column and is not too tall. Changing the size to another intermediate will also update the image "preview."
- Rename "Edit Image" to "Edit Original" to try and better communicate that editing the image will modify the media library item not just the image inserted into the post that is being edited.
(updates two PNGs from precommit)
Props gcorne, see #27366
Built from https://develop.svn.wordpress.org/trunk@27797


git-svn-id: http://core.svn.wordpress.org/trunk@27632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-27 22:41:14 +00:00
Helen Hou-Sandí
502dab46e5 Affix the audio view toolbar to the bottom as opposed to the top of the view. Otherwise it's not accessible when the view is the first item in the content. Said views keep a newline underneath, so there's space for it to appear there instead. fixes #27548, see #27320.
Built from https://develop.svn.wordpress.org/trunk@27792


git-svn-id: http://core.svn.wordpress.org/trunk@27628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-27 20:10:15 +00:00
Scott Taylor
26773541ab Make sure Playlist states that are audio are marked as such with proper localized strings.
See #27554.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-27 18:37:17 +00:00
Andrew Nacin
bd0df204a1 Remove the TinyMCE image toolbar when the image is deleted via the keyboard.
props gcorne.
fixes #27527.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-27 18:07:14 +00:00
Andrew Nacin
68bfa704cf Remove unused JS variables after [27770]. see #27013.
Built from https://develop.svn.wordpress.org/trunk@27783


git-svn-id: http://core.svn.wordpress.org/trunk@27619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-27 17:31:14 +00:00
Helen Hou-Sandí
443ab3001e MCE view controls:
* Move controls back over to the left, as they were before. Wide images and muscle memory have been causing frustration.
* Improve the experience and unify the UI of media view controls. Audio and video views now require an initial click to select before further interaction.
* CSS clean up and organization.

fixes #27320, #27542.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-27 07:02:16 +00:00
Andrew Ozz
15549e75f3 Remove containment of scrolling inside the editor for now. See #27013
Built from https://develop.svn.wordpress.org/trunk@27770


git-svn-id: http://core.svn.wordpress.org/trunk@27607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-27 02:35:14 +00:00
Helen Hou-Sandí
c3b59e06b8 Better, more consistent styling for plugin details Thickbox and TinyMCE help.
props avryl. fixes #26952.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-27 00:08:15 +00:00
Andrew Ozz
cb489f5a9c Add the 'attachment_' prefix to caption IDs after editing, see #24409
Built from https://develop.svn.wordpress.org/trunk@27764


git-svn-id: http://core.svn.wordpress.org/trunk@27601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-27 00:07:14 +00:00
Andrew Nacin
bb129b90f0 Add an .html4-captions class to the editor when HTML5 captions are not supported, for theme use.
see #26642.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-26 23:13:15 +00:00
Andrew Ozz
c66f166956 TinyMCE: fix the More and Next Page tags behavior:
- Append them inside top level <p> tags.
- If the caret is not in a top level <p>, create new paragraph after the current top level tag.
- Do not change placement when edited in the Text editor.
See #27378
Built from https://develop.svn.wordpress.org/trunk@27729


git-svn-id: http://core.svn.wordpress.org/trunk@27566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-26 02:08:15 +00:00
Andrew Ozz
a3d08715ab TinyMCE: bring back removal of the size-* class when the user soft-resizes an image, see #24409
Built from https://develop.svn.wordpress.org/trunk@27694


git-svn-id: http://core.svn.wordpress.org/trunk@27533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-25 00:16:14 +00:00
Scott Taylor
d85ac5b841 Let us pass jshint:core.
Built from https://develop.svn.wordpress.org/trunk@27693


git-svn-id: http://core.svn.wordpress.org/trunk@27532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 23:02:13 +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
Scott Taylor
16f93f3952 When inserting a video shortcode into the editor, set the poster attribute automatically if the video has a featured image attached to it.
See #27460.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-23 03:36:15 +00:00
Scott Taylor
410646fc52 General code cleanup and improving video sizing in the admin:
* Abstract the setting of a primary button and its callback in `wp.media.view.MediaFrame.MediaDetails`
* Account for the existence or non-existence of `$content_width` in the TinyMCE views for video
* Make sure video models always have dimensions, even if they are the defaults
* For browsers that are not Firefox, don't use a timeout when setting the `MediaElementPlayer` instance in TinyMCE views

See #27320.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-22 23:26:17 +00:00
Scott Taylor
615dd5331b Unifying media controls and supporting playlists in the editor:
* Support a `caption` attribute for audio and video shortcodes
* In `wp.media.audio|video`, rename `update` to `shortcode` to allow these models to share the same mixins as `wp.media.collection` subclasses
* When sending an audio or video shortcode to the editor, create a default caption if the user hasn't entered one. This currently only displays in the editor, not on the front end. Captions aren't tied to a specific attachment here because external sources are supported.
* In the `wp.mce.media` mixin, in the `edit` method, read `attr` instead of `data` when attempting to parse the encoded shortcode. `data` does not automatically update when the attribute changes. This was a blessing to debug.
* Add `wp.mce.media.PlaylistView` to support playlist views in TinyMCE
* Expose `WPPlaylistView` to global scope and suppress auto-parsing of playlist nodes when in the admin. Allow `WPPlaylistView` to be passed `metadata` on creation instead of requiring a JSON blob to be parsed.
* Remove all of the playlist logic from the `wpgallery` TinyMCE plugin.
* In `wp_prepare_attachment_for_js()` return more data for audio/video so that playlists can have parity in the admin/front end.

See #27320.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 13:33:14 +00:00
Andrew Ozz
e05fa407bf wpView: select/deselect views when moving the caret with the arrow keys, don't move the caret after deselect(), props gcorne, see #26959
Built from https://develop.svn.wordpress.org/trunk@27632


git-svn-id: http://core.svn.wordpress.org/trunk@27475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 02:48:14 +00:00
Helen Hou-Sandí
bef7f9e75e Further unify and refine media and view control styling. see #27320.
Built from https://develop.svn.wordpress.org/trunk@27628


git-svn-id: http://core.svn.wordpress.org/trunk@27471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 00:48:15 +00:00
Scott Taylor
7ad4205f70 Add MCE views for audio and video shortcodes. When the shortcode does not contain a source that supports native playback, just show the filename.
* Remove the audio/video shortcode parsing from the `wpgallery` plugin.
* Make `mce-view` a dependency of `media-audiovideo`
* Introduce `wp.mce.video`, `wp.mce.audio`, `wp.mce.media`, and `wp.mce.media.View`
* Rename `wp.media.audio|video.shortcode()` to `wp.media.audio|video.update()` since it is called on Update and returns a `wp.shortcode` object now.
* In `wp.mce.View.render()`, fire a `ready` event when the placeholder is being parsed and pass the current node to the event handler.

See #27389, #27437.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 07:02:15 +00:00
Andrew Ozz
ee6d178f15 TinyMCE: update to 4.0.20, see #24067
Built from https://develop.svn.wordpress.org/trunk@27603


git-svn-id: http://core.svn.wordpress.org/trunk@27446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 04:46:15 +00:00
Andrew Ozz
4428dc3b7c TinyMCE show/hide toolbar row: fix the value for getUserSetting('hidetb'): 0 == hidden, 1 == visible, see #24067
Built from https://develop.svn.wordpress.org/trunk@27602


git-svn-id: http://core.svn.wordpress.org/trunk@27445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 02:30:15 +00:00
Andrew Ozz
c2a5748582 wpView: don't overlap floated elements, see #26959
Built from https://develop.svn.wordpress.org/trunk@27601


git-svn-id: http://core.svn.wordpress.org/trunk@27444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 01:16:15 +00:00
Andrew Ozz
41c747f4c1 wpView:
- Makes sure that the editor is focused when clicking on a wpview.
- When a view is the first or last node in the editor and a click on the area around the view adds a new paragraph, deselect the wpview so that the new paragraph is properly focused.
- When navigating via keyboard, select or deselect wpviews as appropriate.
Props gcorne, see #26959
Built from https://develop.svn.wordpress.org/trunk@27582


git-svn-id: http://core.svn.wordpress.org/trunk@27425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 04:57:14 +00:00
Andrew Ozz
a322a0cd3d TinyMCE: move the caption and gallery toolbars to the right, fix selected gallery border/outline, see #27320
Built from https://develop.svn.wordpress.org/trunk@27579


git-svn-id: http://core.svn.wordpress.org/trunk@27422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 02:30:15 +00:00
Andrew Ozz
402f48ca15 TinyMCE:
- Update the styling of the image caption and gallery toolbars.
- Fix issue where the hidden clipboard div in wpView.
- Switch to using the pencil dashicon for Edit.
- Add `max-width: 100%;` to images in the gallery preview and adjust column widths.
Props cramdesign, mattheu, gcorne, melchoyce, see #27320, fixes #27376, fixes #27354

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


git-svn-id: http://core.svn.wordpress.org/trunk@27421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 00:20:15 +00:00
Andrew Ozz
08663710cb TinyMCE: add internal command and shortcut (Alt+Shift+X) for toggling <code>. Define a button that can be added to any toolbar as wp_code. See #6113
Built from https://develop.svn.wordpress.org/trunk@27545


git-svn-id: http://core.svn.wordpress.org/trunk@27388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 22:43:16 +00:00
Scott Taylor
e1fee3abc6 MCE Views: don't (re-)render views if the format of the content is "raw" to avoid adding additional undo levels on undo/redo.
Props gcorne.
Fixes #27416.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 20:41:15 +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
1ebf6bc9ee Drag/drop upload: don't trigger on "local" dragging, hide the overlay on click. Props kovshenin, fixes #19845
Built from https://develop.svn.wordpress.org/trunk@27531


git-svn-id: http://core.svn.wordpress.org/trunk@27374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 00:42:14 +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
2a7918390b TinyMCE modals: re-enable the Close button in charmap, fix arrows in listboxes, add and position dashicons to the menu (when visible), see #26952
Built from https://develop.svn.wordpress.org/trunk@27513


git-svn-id: http://core.svn.wordpress.org/trunk@27356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-12 08:19:14 +00:00
Scott Taylor
f078f3e10e Video editing in the media modal:
* Add a state: `Add Subititles`
* Add `text/vtt` to the list of allowed mime-types, files end in `.vtt`. `.srt` files are served as `text/plain`.
* The content body of a video shortcode should be used for adding `<track>` elements only. This happens dynamically in the modal. If added by hand, they can still be parsed and managed.

See #27016.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-09 10:32:15 +00:00
Scott Taylor
f7af18e1d6 Audio/Video shortcodes in the media modal:
* Make a generic model, `wp.media.model.PostMedia`, which replaces `wp.media.model.PostAudio` and `wp.media.model.PostVideo`
* Make a generic library, `wp.media.controller.MediaLibrary`, which replaces `wp.media.controller.ReplaceVideo` and `wp.media.controller.ReplaceAudio`
* `wp.media.controller.MediaLibrary` is used to create new states that want to load a library filtered by type, making it incredibly simple to add states to frames. See `wp.media.view.MediaFrame.VideoDetails` and `wp.media.view.MediaFrame.AudioDetails`.

UX changes:

* Add the ability to manage HTML5 fallbacks - add additional `<source>`s or remove specific `<source>`s
* In the Video Details state, add the ability to select a poster image

See #27016.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-09 05:25:15 +00:00
Andrew Ozz
a8a20f4bb7 Set minimum z-index for the TinyMCE modals and adjust the z-index in DFW, see #26952
Built from https://develop.svn.wordpress.org/trunk@27460


git-svn-id: http://core.svn.wordpress.org/trunk@27305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-08 00:41:16 +00:00
Andrew Ozz
88a47ecd06 TinyMCE editimage: show the toolbar on mouseup to avoid accidental clicks on the buttons, fixes #24409
Built from https://develop.svn.wordpress.org/trunk@27451


git-svn-id: http://core.svn.wordpress.org/trunk@27297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-07 06:34:14 +00:00
Andrew Ozz
2b697a3d84 TinyMCE: add Ctrl+K, the "de-facto standard" shortcut to open wpLink, fixes #27305
Built from https://develop.svn.wordpress.org/trunk@27449


git-svn-id: http://core.svn.wordpress.org/trunk@27295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-07 03:09: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
Scott Taylor
eda85e17ca Cleanup audio/video shortcodes in the media modal:
* On the controller's `update`, `replace`, and `close` events, call `detach()` on the frame
* Cleanup the HTML ouput of the Underscore templates.
* Move some logic from the Underscore template to the `VideoDetails` view class.

See #27016.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 19:06:16 +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
79441fc1c1 TinyMCE: remove border-radius and padding from placeholder images, props avryl, see #27106
Built from https://develop.svn.wordpress.org/trunk@27427


git-svn-id: http://core.svn.wordpress.org/trunk@27274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 00:29:15 +00:00
Andrew Ozz
62d68cc992 TinyMCE: when parsing [caption] and the width attribute is missing, recreate it from the image tag width, fixes #23103
Built from https://develop.svn.wordpress.org/trunk@27426


git-svn-id: http://core.svn.wordpress.org/trunk@27273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 00:13:14 +00:00