Commit Graph

571 Commits

Author SHA1 Message Date
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
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
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 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 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
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
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
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
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 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
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 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
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
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
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