Commit Graph

26 Commits

Author SHA1 Message Date
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
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
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
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
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
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 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
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
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
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
Andrew Ozz
6074dfa272 Update mce-view.js and the wpview TinyMCE plugin, and use them to show gallery previews in the Visual editor, props gcorne, see #26959
Built from https://develop.svn.wordpress.org/trunk@27408


git-svn-id: http://core.svn.wordpress.org/trunk@27255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 07:01:14 +00:00
Scott Taylor
0347a8944e Update the versions of several devDependencies in package.json. grunt-cssjanus has been updated to 0.2.2, we no longer need the fork. Run npm install to receive updates for node_modules in the project root.
Props yoavf, TobiasBg.
Fixes #26073.


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


git-svn-id: http://core.svn.wordpress.org/trunk@26927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-29 04:43:30 +00:00
Andrew Ozz
a16cc19790 TinyMCE:
- Fix toolbar icons in IE9.
- Remove background gradients in IE < 10.
- Lint our plugins.
- Add draggable attribute to the caption wrapper and make the captioned images non-draggable in Chrome.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26880


git-svn-id: http://core.svn.wordpress.org/trunk@26763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-30 01:54:11 +00:00
Andrew Ozz
855889f7aa TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876


git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-28 23:53:15 +00:00