Commit Graph

820 Commits

Author SHA1 Message Date
Andrew Ozz
4bb5d76abc TinyMCE: when pasting an URL, check if the node it is pasted at is empty and remove any empty inline child elements.
Fixes #31158.
Built from https://develop.svn.wordpress.org/trunk@31856


git-svn-id: http://core.svn.wordpress.org/trunk@31835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-20 20:34:28 +00:00
Andrew Ozz
78f0ca13c5 TinyMCE: revert stripping of tags from pasted URLs on beforeSetContent [31817] and [31819]. Clean up URLs on pastePreProcess.
See #31158.
Built from https://develop.svn.wordpress.org/trunk@31832


git-svn-id: http://core.svn.wordpress.org/trunk@31814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-19 07:08:26 +00:00
Andrew Ozz
8d9fc7e51b TinyMCE emoji: fix highlighting of selected replacement images in Chrome.
Props iseulde. Fixes #31628.
Built from https://develop.svn.wordpress.org/trunk@31822


git-svn-id: http://core.svn.wordpress.org/trunk@31804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-18 21:54:26 +00:00
Andrew Ozz
aa9e920e57 TinyMCE: small cleanup for stripping of tags from pasted URLs. See #31158.
Built from https://develop.svn.wordpress.org/trunk@31819


git-svn-id: http://core.svn.wordpress.org/trunk@31801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-18 20:53:27 +00:00
Andrew Ozz
b30d15cd4a TinyMCE: strip tags from pasted URLs before testing if they are embeddable.
Props siobhan, iseulde. Fixes #31158.
Built from https://develop.svn.wordpress.org/trunk@31817


git-svn-id: http://core.svn.wordpress.org/trunk@31799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-18 20:26:26 +00:00
Andrew Ozz
c18ef513a0 Emoji: fix few typos. See #31242.
Built from https://develop.svn.wordpress.org/trunk@31787


git-svn-id: http://core.svn.wordpress.org/trunk@31767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-15 23:29:26 +00:00
Andrew Ozz
a7fd4a3774 Emoji:
- Add the styling for the replacement images to the admin CSS.
- Revert to using `.emoji` as replacement image class.
- When pasting in the editor, convert emoji images to our format so we can replace them with chars on saving.
- Some more clean up of both the plugin and wp-emoji.js.
See #31242.
Built from https://develop.svn.wordpress.org/trunk@31786


git-svn-id: http://core.svn.wordpress.org/trunk@31766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-15 23:16:29 +00:00
Andrew Ozz
8a402aa701 Emoji:
- Move the TinyMCE plugin CSS to wp-content.css.
- Change the replacement images class to `wp-emoji` inside the editor.
- Clean up both the plugin and wp-emoji.js, abstract and restructure a bit.
See #31242.
Built from https://develop.svn.wordpress.org/trunk@31779


git-svn-id: http://core.svn.wordpress.org/trunk@31759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-14 23:49:30 +00:00
Andrew Ozz
731f7c500d TinyMCE: fix emoji parsing in IE typo. See #31242.
Built from https://develop.svn.wordpress.org/trunk@31762


git-svn-id: http://core.svn.wordpress.org/trunk@31743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 23:03:26 +00:00
Andrew Ozz
b20119d92f TinyMCE: fix emoji parsing in IE. See #31242.
Built from https://develop.svn.wordpress.org/trunk@31761


git-svn-id: http://core.svn.wordpress.org/trunk@31742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 23:00:27 +00:00
Gary Pendergast
b7546d798f Emoji: Instead of having custom hooks for Ajax callbacks, use MutationObserver to re-parse any changed elements in the DOM.
Props iseulde

See #31242


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


git-svn-id: http://core.svn.wordpress.org/trunk@31731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 12:52:26 +00:00
Andrew Nacin
78679bfb3f Emoji JS cleanup.
* Filename: emoji.js => wp-emoji.js
 * Script handle: emoji => wp-emoji
 * Object: WPEmoji => wp.emoji
 * Script settings: EmojiSettings => _wpemojiSettings
 * Setting key: base_url => baseUrl
 * Remove executable bit from files

see #31242.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 03:17:26 +00:00
Andrew Ozz
8b53e5470d TinyMCE: remove blocking of commands on placeholder images. Breaks some execCommand.
Props iseulde. Fixes #31571.
Built from https://develop.svn.wordpress.org/trunk@31738


git-svn-id: http://core.svn.wordpress.org/trunk@31719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 23:33:28 +00:00
Gary Pendergast
46e2a65cf1 Add emoji support, with Twemoji fallback.
Replace exisiting smilies with equivalent emoji, or with shiny new smiley images where no emoji existed.

Props batmoo, joen and mkaz for the original plugin upon which this is based.

Props pento, iseulde, kraftbj and peterwilsoncc for making the internet's dreams come true.

See #31242


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


git-svn-id: http://core.svn.wordpress.org/trunk@31714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 22:49:28 +00:00
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