Commit Graph

74 Commits

Author SHA1 Message Date
Andrew Ozz fb5b41aa7b TinyMCE: normalize font size for H1 - H6 submenu, fixes #24586.
git-svn-id: https://develop.svn.wordpress.org/trunk@24545 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-03 02:03:19 +00:00
Andrew Ozz 03f38ae6ca TinyMCE: don't import color and background-color from the content when creating menus that have preview capabilities.
Fixes a visual glitch: when post formats styling is added in editor-styles.css, it is applied to the menus and not reset after changing format. See #24308.

git-svn-id: https://develop.svn.wordpress.org/trunk@24341 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-23 22:49:06 +00:00
Andrew Nacin 57a7513b56 Remove ancient 'lookup' quicktag from the text editor. This had called up answers.com.
props mboynes, jonbishop, SergeyBiryukov.
fixes #23322.



git-svn-id: https://develop.svn.wordpress.org/trunk@24052 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-22 20:17:25 +00:00
Andrew Ozz e4b6b84d8e Pass post format as a class to TinyMCE's body, props adamsilverstein, fixes #23198
git-svn-id: https://develop.svn.wordpress.org/trunk@23730 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-16 05:57:54 +00:00
Andrew Nacin 8198998a83 Ensure [23122] gets parsed as context. props TobiasBg. fixes #22808.
git-svn-id: https://develop.svn.wordpress.org/trunk@23123 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-07 18:50:16 +00:00
Andrew Nacin 53f230b982 Update fullscreen/DFW's "Text" tab to match the string context used for the editor Text tab. Not a string change. props pavelevap, fixes #22808.
git-svn-id: https://develop.svn.wordpress.org/trunk@23122 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-07 18:36:15 +00:00
Andrew Nacin 66f1a19089 Add a sane, inclusive HTML element/attribute schema to TinyMCE.
TinyMCE 3.4.x (shipped with WordPress 3.4.x) had an HTML4-based schema definition, with HTML5 elements added to it. TinyMCE 3.5.x (shipping, again coincidentally, with WordPress 3.5) allows for HTML5 schema support, which also provides for full HTML5 attribute support. The problem is its HTML5 schema excludes all HTML4 elements and attributes that were dropped in the HTML5 spec, which is unacceptable behavior.

This "duck punch" of TinyMCE's Schema.js file creates a new, sane schema. It is TinyMCE's HTML4 and HTML5 schema definitions recursively merged.

Objects are not whitelisted in either schema to allow for embed elements as child nodes, so object, param, and embed remain separately whitelisted in the WordPress TinyMCE plugin. Our attempts to add other attributes in said plugin is now superceded.

props koopersmith, azaozz.
fixes #22790.



git-svn-id: https://develop.svn.wordpress.org/trunk@23120 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-07 11:26:25 +00:00
Andrew Ozz 37d1401f33 5000, not 3000, see #22708
git-svn-id: https://develop.svn.wordpress.org/trunk@23017 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-04 06:05:08 +00:00
Andrew Ozz 7bc623ca09 Editor: add sanity limit for editor height of 5000px, save only when resizing the Visual or the Text editor, fixes #22708
git-svn-id: https://develop.svn.wordpress.org/trunk@23016 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-04 06:01:47 +00:00
Ryan Boren c53137f535 Scope button classes so they can be used on the frontend without interfering with theme styles.
Props helenyhou, koopersmith
fixes #22644


git-svn-id: https://develop.svn.wordpress.org/trunk@22948 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 13:40:59 +00:00
Andrew Nacin a5a14e4e7e No-JS fixes.
* Hide QuickPress.
 * Hide the gap between the title and content editor.
 * Hide 'select all' checkboxes in list tables.
 * Hide a non-functioning link in the custom fields metabox.
 * Hide non-functioning buttons in the featured image box (same as in 3.4).
 * RTL and miscellany.

props TobiasBg, lessbloat, ocean90. fixes #22456.



git-svn-id: https://develop.svn.wordpress.org/trunk@22719 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-20 18:20:14 +00:00
Daryl Koopersmith 223eb63b6f Media: Restore 3.4 editor behavior and remove TinyMCE views.
* Reactivates the `wpgallery` and `wpeditimage` TinyMCE plugins. Deactivates the `wpviews` TinyMCE plugin.
* Moves still-relevant logic from `mce-views.js` to `media-upload.js` and `shortcode.js`.
* No longer include `wp-includes/js/mce-views.js`. This code will not be used in 3.5, and should be considered unstable.
* Currently, this is the real 3.4 experience; as such, editing triggers the old modals. Changing this is the next major step.

When reassessing views, we should look over all of these tickets and anticipate these bugs accordingly.

fixes #21813, #22123, #22155, #22161, #22257, #22266, #22318, #22407, see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22567 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-14 07:17:22 +00:00
Andrew Nacin f9abbced91 Use correct variable name in code comment. props SergeyBiryukov, fixes #21962.
git-svn-id: https://develop.svn.wordpress.org/trunk@22416 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 08:57:49 +00:00
Andrew Ozz c0ca932fe1 Editor: fix setting wpActiveEditor when TinyMCE is not used, see #21718
git-svn-id: https://develop.svn.wordpress.org/trunk@22251 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 22:01:30 +00:00
Andrew Ozz 2f8193421c Tab indexes: when tabbing out of the editors make sure the next focused element is the expected/default action, fix focusing the next field when picking a date for future post, props lessbloat, fixes #21340
git-svn-id: https://develop.svn.wordpress.org/trunk@22250 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 21:38:35 +00:00
Daryl Koopersmith d43c390e2b Use the new media modal to insert galleries into TinyMCE and the text editor.
'''Galleries'''

* Gallery insertion from the new media modal (into TinyMCE, the text editor, etc).
* Gallery previews in TinyMCE now use the `wp.mce.views` API.
* Disables the TinyMCE `wpgallery` plugin.
* Gallery previews consist of the first image of the gallery and the appearance of a stack. This will later be fleshed out to include more images/functionality (including editing the gallery, gallery properties, and showing the number of images in the gallery).
* Multiple galleries can be added to a single post.
* The gallery MCE view provides a bridge between the `wp.shortcode` and `Attachments` representation of a gallery, which allows the existing collection to persist when a gallery is initially created (preventing a request to the server for the query).


'''Shortcodes'''

* Renames `wp.shortcode.Match` to `wp.shortcode` to better expose the shortcode constructor.
* The `wp.shortcode` constructor now accepts an object of options instead of a `wp.shortcode.regexp()` match.
* A `wp.shortcode` instance can be created from a `wp.shortcode.regexp()` match by calling `wp.shortcode.fromMatch( match )`.
* Adds `wp.shortcode.string()`, which takes a set of shortcode parameters and converts them into a string.* Renames `wp.shortcode.prototype.text()` to `wp.shortcode.prototype.string()`.
* Adds an additional capture group to `wp.shortcode.regexp()` that records whether or not the shortcode has a closing tag. This allows us to improve the accuracy of the syntax used when transforming a shortcode object back into a string.

'''Media Models'''

* Prevents media `Query` models from observing the central `Attachments.all` object when query args without corresponding filters are set (otherwise, queries quickly amass false positives).
* Adds `post__in`, `post__not_in`, and `post_parent` as acceptable JS attachment `Query` args.
* `Attachments.more()` always returns a `$.promise` object.

see #21390, #21809, #21812, #21815, #21817.


git-svn-id: https://develop.svn.wordpress.org/trunk@22120 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-05 04:23:59 +00:00
Andrew Ozz 8b575394a5 Fix background on split buttons, remove redundant !important, remove spacers, a little css cleanup, see #18141
git-svn-id: https://develop.svn.wordpress.org/trunk@22025 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 00:41:49 +00:00
Andrew Nacin e82d5080b8 New HiDPI spinner. Uses clean <span class="spinner"></span> markup.
Be on the lookout for weirdness.
props lessbloat. see #21456.



git-svn-id: https://develop.svn.wordpress.org/trunk@22019 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 19:57:44 +00:00
Daryl Koopersmith 0dd940e0c1 First pass on TinyMCE attachment in-editor UI.
* Adds in-editor UI for image attachments. Most of this UI should be able to migrate to all images in a future commit.
* Removes the wpeditimage TinyMCE plugin from the default plugins array.
* Add `wp.media.fit`, a helper method to constrain dimensions based upon a maximum width and/or height.
* Add html attribute parsing and string generation utilities (currently stored in mce-views).
* Calling `remove` on a TinyMCE views now ensures that the the parent and references are removed as well.
* Fixes a bug where we weren't sending the full array of results to matches in wp.mce.view.

see #21390, #21812, #21813.



git-svn-id: https://develop.svn.wordpress.org/trunk@22012 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 14:12:54 +00:00
Andrew Ozz 5ad7fe8cd6 Main editor: maintain the height when switching Visual to Text and back, save the height when resizing as user state, output the height in the textarea tag when loading, (thanks @nacin for the help), fixes #21718
git-svn-id: https://develop.svn.wordpress.org/trunk@22007 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 03:30:21 +00:00
Daryl Koopersmith 0a0732f9ab Makes custom TinyMCE views easier to implement.
For details and examples, see the ticket.

props azaozz, fixes #21812.


git-svn-id: https://develop.svn.wordpress.org/trunk@21961 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 00:13:18 +00:00
Andrew Ozz 2bd5e1830b Switch TinyMCE's schema to 'html5', add 'autofocus' to the attributes map for <input>, part props SergeyBiryukov, fixes #13314
git-svn-id: https://develop.svn.wordpress.org/trunk@21875 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-16 21:20:35 +00:00
Ryan Boren 31ec698423 Use get_post() instead of global $post.
Make the $post argument to get_post() optional, defaulting to the current post in The Loop.

Props nacin
see #21309


git-svn-id: https://develop.svn.wordpress.org/trunk@21735 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 16:29:28 +00:00
Ryan Boren 92ea34f6a2 Use set_url_scheme(). Props johnbillion, MarcusPope. see #19037 #20759
git-svn-id: https://develop.svn.wordpress.org/trunk@21664 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-30 13:33:00 +00:00
Andrew Ozz ce9a8bdd8e Disable the (fake) image resizing in WebKit and Opera in TinyMCE 3.5.6, fix dragging image with caption in Firefox, see #21173
git-svn-id: https://develop.svn.wordpress.org/trunk@21576 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-22 01:47:53 +00:00
Andrew Ozz dbb09dee01 Add translation context for the Text editor tab name, props obenland, fixes #20993
git-svn-id: https://develop.svn.wordpress.org/trunk@21417 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-03 21:08:52 +00:00
Andrew Ozz 461bdfbd2d Put the spinner back to the right of the search field in internal linking, fixes #21351
git-svn-id: https://develop.svn.wordpress.org/trunk@21319 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-25 04:41:18 +00:00
Andrew Ozz 6e6b727315 Remove nearly all tabindex attributes from the admin, leaving them only where absolutely necessary (for now that's only the toolbar).
Add tabindex="-1" for the menu images links to avoid double tab stops there when the menu is expanded.

Fix/add auto-focus on the first input fields on the Add/Edit Post, all taxonomy, all edit taxonomy, Log In and Edit Comment screens.

See #21340.

git-svn-id: https://develop.svn.wordpress.org/trunk@21311 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-24 00:15:15 +00:00
Andrew Ozz bae315cbca Fix internal linking search spinner position, fixes #21351
git-svn-id: https://develop.svn.wordpress.org/trunk@21306 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-23 22:18:28 +00:00
Andrew Ozz 446b40235f TinyMCE: fix tabbig in and out of the editor, fixes #20834
git-svn-id: https://develop.svn.wordpress.org/trunk@21300 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-22 02:33:53 +00:00
Andrew Ozz 757652fe01 Clarify that 'html' refers to the Text editor tab, see #20993
git-svn-id: https://develop.svn.wordpress.org/trunk@21218 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-05 20:28:01 +00:00
Mark Jaquith 5d74a50af4 Switch "HTML" tab to "Text" in DFW mode. Update documentation and inline comments to refer to the "Text" tab or mode instead of "HTML". see #20993
git-svn-id: https://develop.svn.wordpress.org/trunk@21212 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-05 15:28:13 +00:00
Mark Jaquith 40da33e326 Rename the "HTML" editor tab to "Text" (as it has never been a pure HTML editor, but a text editor that supports HTML and also does some HTML transformations automatically). fixes #20993
git-svn-id: https://develop.svn.wordpress.org/trunk@21211 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-05 15:19:01 +00:00
Andrew Nacin 95159b0788 Allow add_editor_style() to load a child theme's editor style when the parent theme's style exists for the same filename. props SergeyBiryukov. see #21026 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@21114 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-25 20:45:05 +00:00
Andrew Ozz 7e34db14c8 Fix adding of parent theme's editor-style before child theme's, props SergeyBiryukov, see #19437
git-svn-id: https://develop.svn.wordpress.org/trunk@20342 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-02 22:26:11 +00:00
Andrew Ozz 790f4e47f9 Rename back the handle for the editor CSS, props nacin, fixes #19843
git-svn-id: https://develop.svn.wordpress.org/trunk@20334 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-31 16:32:47 +00:00
Andrew Nacin f0a12b86ea Move editor-buttons.css to editor.css to reflect its current use. see #19843.
git-svn-id: https://develop.svn.wordpress.org/trunk@20283 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-24 13:43:52 +00:00
Andrew Ozz fcbd8f7f57 Set proper HTML5 input types in the admin, props georgestephanis, fixes #17863
git-svn-id: https://develop.svn.wordpress.org/trunk@20168 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-10 01:23:48 +00:00
Andrew Ozz 78c8dedcdc Add support for DFW for all instances of the editor, part props sushkov, fixes #19843
git-svn-id: https://develop.svn.wordpress.org/trunk@20166 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-09 23:23:10 +00:00
Andrew Ozz 5d4a0adebd Don't pass non-existing rtl stylesheet to TinyMCE, update phpdoc for add_editor_style(), see #19437
git-svn-id: https://develop.svn.wordpress.org/trunk@20059 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-01 00:18:26 +00:00
Andrew Ozz 402c8c302d Load TinyMCE's non-minified "*src.js" plugin files when SCRIPT_DEBUG is defined, part props ericlewis, fixes #20055
git-svn-id: https://develop.svn.wordpress.org/trunk@19945 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-18 06:43:47 +00:00
Jon Cave aeff5194b5 Stop WP_Editor from outputting TinyMCE external plugins/languages multiple times. Props Cyapow. Fixes #19648.
git-svn-id: https://develop.svn.wordpress.org/trunk@19913 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-13 18:05:04 +00:00
Andrew Ozz 5c1c053485 Add the editor ID and the post type (when available) as classes to the TinyMCE's body, fixes #19437
git-svn-id: https://develop.svn.wordpress.org/trunk@19912 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-13 07:22:45 +00:00
Andrew Nacin 0c751dd7a3 Use relative paths for admin-ajax.php to avoid cross-domain issues with IDN domains in IE and Opera. props SergeyBiryukov, fixes #18952.
git-svn-id: https://develop.svn.wordpress.org/trunk@19871 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-08 16:12:11 +00:00
Andrew Nacin d0ec0de49d Translate TinyMCE's spellchecker languages. props SergeyBiryukov, fixes #19962.
git-svn-id: https://develop.svn.wordpress.org/trunk@19833 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-06 19:13:06 +00:00
Andrew Ozz 4f500fdb56 Update TinyMCE to 3.4.8, fixes #19969, fixes #19936, fixes #19741
git-svn-id: https://develop.svn.wordpress.org/trunk@19830 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-04 22:23:27 +00:00
Ryan Boren 2b186b0c45 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: https://develop.svn.wordpress.org/trunk@19712 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-08 17:01:11 +00:00
Ryan Boren f1ec82c3a7 Update some @since. Props dgwyer. fixes #19638
git-svn-id: https://develop.svn.wordpress.org/trunk@19673 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-04 19:03:33 +00:00
Andrew Ozz 662639bbbe Editor: fix invalid nested lists, fix tabbing - Tab goes to Publish/Update, Shift + Tab goes back to Title, fixes #18261
git-svn-id: https://develop.svn.wordpress.org/trunk@19631 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-25 17:27:39 +00:00
Andrew Ozz cd59832859 Make sure editor-buttons.css is loaded even if tiny_mce.js is used directly and the wp_theme skin is selected in the settings, see #17144
git-svn-id: https://develop.svn.wordpress.org/trunk@19533 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-01 21:27:19 +00:00