Commit Graph

844 Commits

Author SHA1 Message Date
Andrew Ozz
4f9682f39e TinyMCE wpView: preserve HTML wrapped in shortcodes.
Fixes #32078.
Built from https://develop.svn.wordpress.org/trunk@32678


git-svn-id: http://core.svn.wordpress.org/trunk@32648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-01 18:09:26 +00:00
Andrew Ozz
b3d04247b7 Editor:
- Remove the old DFW.
- Add back-compat stub for wp-fullscreen.js.
- Keep wp_ajax_wp_fullscreen_save_post() for now.
See #30949.
Built from https://develop.svn.wordpress.org/trunk@32677


git-svn-id: http://core.svn.wordpress.org/trunk@32647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-01 17:38:29 +00:00
Ella Iseulde Van Dorpe
6e0e924de9 TinyMCE: wpeditimage: trim class
Don't add extra spaces to classes. It causes some tests in the TinyMCE QUnit test suite to fail.

Fixes #31764.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-25 06:35:28 +00:00
Andrew Ozz
3181cc27a9 TinyMCE: update to 4.1.10.
Fixes #32262.
Built from https://develop.svn.wordpress.org/trunk@32366


git-svn-id: http://core.svn.wordpress.org/trunk@32336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-06 03:23:25 +00:00
Andrew Nacin
b63a76fa4b Fix keyboard shortcut for save from the visual editor.
props iseulde.
see #32122, for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-26 04:51:29 +00:00
Andrew Ozz
bafd7b98f6 TinyMCE wpView: properly deselect views when hiding the editor. Do not remove selected on PreProcess.
Fixes #32045.
Built from https://develop.svn.wordpress.org/trunk@32257


git-svn-id: http://core.svn.wordpress.org/trunk@32228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-21 21:32:26 +00:00
Andrew Ozz
955b0bf979 TinyMCE: fix creating a preview when pasting an embeddable URL in Firefox.
Part prop iseulde. Fixes #31988.
Built from https://develop.svn.wordpress.org/trunk@32229


git-svn-id: http://core.svn.wordpress.org/trunk@32203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-20 20:57:28 +00:00
Andrew Ozz
f08c38112b TinyMCE: use window.twemoji directly in the wpemoji plugin. Gives a chance to the browser to lazy load twemoji.js when reloading the page.
Fixes #31901.
Built from https://develop.svn.wordpress.org/trunk@32142


git-svn-id: http://core.svn.wordpress.org/trunk@32122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-18 23:29:26 +00:00
Andrew Ozz
6c5dec8886 TinyMCE: remove the empty paragraph that sometimes is left over after adding an image caption.
Fixes #32003.
Built from https://develop.svn.wordpress.org/trunk@32141


git-svn-id: http://core.svn.wordpress.org/trunk@32121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-18 21:56:27 +00:00
Andrew Ozz
9891900a82 TinyMCE wpView:
- Remove selected views when inserting content but not when loading all content.
- Remove the ref. to the selected view node on resetting the views.
Fixes #31998.
Built from https://develop.svn.wordpress.org/trunk@32140


git-svn-id: http://core.svn.wordpress.org/trunk@32120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-18 20:48:27 +00:00
Andrew Ozz
fd80c0f51f TinyMCE: disable the wp-autoresize plugin in iOS. All iframes there are already expanded to the height of the content document.
Fixes #31937.
Built from https://develop.svn.wordpress.org/trunk@32095


git-svn-id: http://core.svn.wordpress.org/trunk@32074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-09 00:11:27 +00:00
Dominik Schilling
0810c24ff0 Merge strings that describe the same command.
props iseulde.
fixes #31776.
Built from https://develop.svn.wordpress.org/trunk@32078


git-svn-id: http://core.svn.wordpress.org/trunk@32057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-08 16:59:26 +00:00
Andrew Ozz
5f5a38e032 TinyMCE: update the "Keyboard Shortcuts" modal.
Fixes #29558.
Built from https://develop.svn.wordpress.org/trunk@32060


git-svn-id: http://core.svn.wordpress.org/trunk@32039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-06 23:17:28 +00:00
Andrew Ozz
5493e3249e TinyMCE: fix our shortcuts on Mac, use Ctrl + Opt + letter.
Props iseulde. See #29558.
Built from https://develop.svn.wordpress.org/trunk@32059


git-svn-id: http://core.svn.wordpress.org/trunk@32038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-06 22:51:27 +00:00
Andrew Ozz
0b80f80209 TinyMCE: update to 4.1.9+. Changes:
- Fixed bug where extra empty paragraphs would get deleted in WebKit/Blink due to recent Quriks fix.
- Fixed bug where the editor wouldn't work properly on IE 12 due to some required browser sniffing.
- Fixed bug where formatting shortcut keys where interfering with Mac OS X screenshot keys.
Fixes #31895.
Built from https://develop.svn.wordpress.org/trunk@32058


git-svn-id: http://core.svn.wordpress.org/trunk@32037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-06 20:38:26 +00:00
Andrew Ozz
0186bbcb95 TinyMCE wpView:
- Fix editor undo levels.
- Remove views and markers in the DOM before serialization.
- Unbind views before removing them on hide.
- Empty the content in the timeout, so it doesn't render iframes twice.
Props iseulde. Fixes #31669.
Built from https://develop.svn.wordpress.org/trunk@32022


git-svn-id: http://core.svn.wordpress.org/trunk@32001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-04 23:00:26 +00:00
Scott Taylor
5855cb0e60 When editing an image from the editor, and the image has a value for alignment (but not for width or caption), don't bail without first checking that the alignment's value is not alignnone. If so, add the class to the <a> before bailing.
See #21848.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 16:04:27 +00:00
Andrew Ozz
e053979219 Emoji:
- Enhance twemoji.js to support passing of additional attributes for the replacement images.
- Use that to add the needed attributes when replacing emoji inside the editor.
Fixes #31627.
Built from https://develop.svn.wordpress.org/trunk@31948


git-svn-id: http://core.svn.wordpress.org/trunk@31927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 02:39:28 +00:00
Andrew Ozz
5fe7be9757 TinyMCE emoji: fix caret position after replacing emoji in Chrome on Windows 8.
See #31627.
Built from https://develop.svn.wordpress.org/trunk@31946


git-svn-id: http://core.svn.wordpress.org/trunk@31925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-31 23:35:26 +00:00
Andrew Ozz
b5643f9a13 TinyMCE wpView: add back the removal of selected views on inserting new content. Was removed when reverting the first fix for embedding of pasted URLs.
Props mattheu. Fixes #31796.
Built from https://develop.svn.wordpress.org/trunk@31931


git-svn-id: http://core.svn.wordpress.org/trunk@31910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-30 18:22:27 +00:00
Andrew Ozz
8ff664171d Remove unused vars. See #31627.
Built from https://develop.svn.wordpress.org/trunk@31923


git-svn-id: http://core.svn.wordpress.org/trunk@31902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-30 02:50:27 +00:00
Andrew Ozz
f128f08c2c TinyMCE emoji: catch the inserting of emoji chars with the Windows 8 onscreen keyboard and replace if needed.
Fixes #31627.
Built from https://develop.svn.wordpress.org/trunk@31922


git-svn-id: http://core.svn.wordpress.org/trunk@31901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-30 02:39:28 +00:00
Andrew Ozz
1b2d93fbca TinyMCE: make sure the editor is not completely empty before checking if the user clicked above or below a wpView.
Fixes #31765.
Built from https://develop.svn.wordpress.org/trunk@31888


git-svn-id: http://core.svn.wordpress.org/trunk@31867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-25 18:55:29 +00:00
Andrew Ozz
990f1b43a8 TinyMCE: pad empty paragraphs with <br> in Chrome to stop it from inserting non-breaking spaces in them.
Props iseulde. Fixes #31255.
Built from https://develop.svn.wordpress.org/trunk@31878


git-svn-id: http://core.svn.wordpress.org/trunk@31857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-25 01:18:26 +00:00
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