Commit Graph

198 Commits

Author SHA1 Message Date
Andrew Ozz
bd800fbca4 Editor, wpLink:
- Restore the bottom half of the modal.
- Make it always expanded and remove the toggle. It is used as advanced link options now, no need to have simple mode.

Props iseulde, adamsilverstein, azaozz.
Fixes #36359.

git-svn-id: https://develop.svn.wordpress.org/trunk@37154 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-01 21:12:18 +00:00
Dominik Schilling (ocean90)
0a9951a3b9 Editor: Make the tooltip for the 'apply' button in the inline link dialog translatable.
Props SergeyBiryukov.
Fixes #36366.

git-svn-id: https://develop.svn.wordpress.org/trunk@37091 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-29 21:10:39 +00:00
Andrew Ozz
69a7d21279 TinyMCE, inline link:
- Remove bottom box-shadow from the Apply button so it matches the rest.
- Change the tooltip for the cogwheel button to Link options.

See #33301.

git-svn-id: https://develop.svn.wordpress.org/trunk@37001 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-16 02:03:21 +00:00
Andrew Ozz
30d63dde4b wpLink: fix accessibility issues:
- Add role=dialog and an aria-labelledby attribute to the modal container.
- Change the modal title to h1.
- Remove one ` ` that gets read out as `blank` by screen readers.
- Replace the Cancel link with a button.
- Clean up unused CSS.

Props afercia.
Fixes #30468.

git-svn-id: https://develop.svn.wordpress.org/trunk@36991 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-14 20:54:58 +00:00
Andrew Ozz
289e9473df TinyMCE, inline link:
- Remove unused user setting for wpLink.
- Remove redundant text and variable from wp_link_dialog().

Props afercia, azaozz.
See #33301.

git-svn-id: https://develop.svn.wordpress.org/trunk@36985 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-14 01:38:09 +00:00
Andrew Ozz
392942e603 TinyMCE textpattern:
- Add description of the new patterns to the Shortcuts help modal.
- Fix the layout a bit and make the patterns in two columns.
- Disable the `textpatterns` plugin in IE < 9.

See #33300.

git-svn-id: https://develop.svn.wordpress.org/trunk@36761 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-28 18:59:25 +00:00
Andrew Ozz
fb89bad3e1 TinyMCE, inline link dialog:
- Remove the bottom half of the (old) modal and add autocomplete on the URL field.
- Disable the inline edit dialog in old IE (7, 8 and 9). Use only the modal there.
- Fix in IE10 and 11.
- Fix (most?) remaining edge cases.
- Fix focusing the inline dialog, the modal and the editor.

See #33301.

git-svn-id: https://develop.svn.wordpress.org/trunk@36677 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 06:20:01 +00:00
Andrew Ozz
b4779f7368 TinyMCE inline link:
- Fix not displaying anything when the URL is only a fragment. Show the whole URL.
- Fix editing a link when it is the very first word in the editor.
- Fix editing a link then some of the surrounding text or space is selected. Change the selection to only the link node.
- Add placeholder when adding new link.

See #33301.

git-svn-id: https://develop.svn.wordpress.org/trunk@36483 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-06 00:50:31 +00:00
Ella Iseulde Van Dorpe
b780792d87 TinyMCE: add inline link dialog
First run.
Links the advanced button to the "old" dialog for now.

See #33301.


git-svn-id: https://develop.svn.wordpress.org/trunk@36384 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-23 00:07:29 +00:00
Andrew Ozz
83f93e5e70 Editor: remove the format_for_editor filter from the_editor_content after it runs as the next editor instance on the same page may not need it.
Props marcochiesi, azaozz.
Fixes #28403.

git-svn-id: https://develop.svn.wordpress.org/trunk@36062 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-22 22:39:01 +00:00
Pascal Birchler
94da64bff3 Docs: Improve documentation for format_for_editor() and the 'the_editor_content' filter it is hooked to.
Props AramZS for initial patch.
Fixes #34866.

git-svn-id: https://develop.svn.wordpress.org/trunk@35904 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-13 19:21:32 +00:00
John Blackbourn
3ced239517 Correct the parameter type for the $stylesheet parameter in the mce_css filter documentation.
Fixes #34721
Props hnle


git-svn-id: https://develop.svn.wordpress.org/trunk@35660 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 17:06:22 +00:00
Sergey Biryukov
ee4e4b8ff2 Embeds: Rename TinyMCE wpoembed plugin to wpembed.
Props swissspidy.
Fixes #34272.

git-svn-id: https://develop.svn.wordpress.org/trunk@35397 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-26 14:49:25 +00:00
Sergey Biryukov
9da02a9155 Remove unused variable in _WP_Editors::editor().
Props Athsear.
Fixes #34427.

git-svn-id: https://develop.svn.wordpress.org/trunk@35380 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-24 14:31:05 +00:00
Ella Iseulde Van Dorpe
4abf64eb14 TinyMCE: add lang attribute
This is needed to make `hyphens: auto;` work correctly.

Fixes #32555.


git-svn-id: https://develop.svn.wordpress.org/trunk@35217 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-16 10:10:32 +00:00
Gary Pendergast
43bd3d46c9 Embeds: Add oEmbed provider support.
For the past 6 years, WordPress has operated as an oEmbed consumer, allowing users to easily embed content from other sites. By adding oEmbed provider support, this allows any oEmbed consumer to embed posts from WordPress sites.

In addition to creating an oEmbed provider, WordPress' oEmbed consumer code has been enhanced to work with any site that provides oEmbed data (as long as it matches some strict security rules), and provides a preview from within the post editor.

For security, embeds appear within a sandboxed iframe - the iframe content is a template that can be styled or replaced entirely by the theme on the provider site.

Props swissspidy, pento, melchoyce, netweb, pfefferle, johnbillion, extendwings, davidbinda, danielbachhuber, SergeyBiryukov, afercia

Fixes #32522.



git-svn-id: https://develop.svn.wordpress.org/trunk@34903 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 10:35:18 +00:00
Drew Jaynes
69db043e3c Docs: There are quite alot of typos in core inline comments.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34717 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 04:12:16 +00:00
Sergey Biryukov
c57efab4f4 Add a comment to strings where the ellipsis cannot be used due to json_encode(), placeholders, or external dependencies.
Fixes #32875.

git-svn-id: https://develop.svn.wordpress.org/trunk@34233 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 11:58:41 +00:00
Dominik Schilling (ocean90)
ed36c88b73 Revert [34013] and parts of [33970].
* `_WP_Editors::wp_mce_translation()` can't be changed without changing strings in TinyMCE and plugins.
* `\u2026` is escaped by `json_encode()` to `\\u2026`, makes `\u2026` visible in our UI.

See #32875.

git-svn-id: https://develop.svn.wordpress.org/trunk@34087 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-12 20:02:43 +00:00
Scott Taylor
8ed569b1ea After [33970], swap UTF-8 characters for their \u2026 escape sequence.
See #32875.


git-svn-id: https://develop.svn.wordpress.org/trunk@34013 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 20:29:18 +00:00
Sergey Biryukov
5d8eb77621 Merge two similar strings.
Props dipesh.kakadiya.
Fixes #33777.

git-svn-id: https://develop.svn.wordpress.org/trunk@33998 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 10:58:58 +00:00
Scott Taylor
d6e73d47e4 Round 2 of: We should use ellipses &hellip; / … instead of three dots/periods ... e.g Loading… not Loading...
Props yoavf.
Fixes #32875.


git-svn-id: https://develop.svn.wordpress.org/trunk@33970 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 04:38:31 +00:00
Andrew Ozz
0807da1bdd TinyMCE: disable the native fullscreen plugin on mobile devices by default.
Props iseulde. Fixes #33137;

git-svn-id: https://develop.svn.wordpress.org/trunk@33835 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-31 22:44:40 +00:00
Scott Taylor
a14be1fffa In _WP_Editors::editor_settings(), $first_run is unused.
See #33491.


git-svn-id: https://develop.svn.wordpress.org/trunk@33699 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 18:29:31 +00:00
Andrew Ozz
46f0c4d4e0 TinyMCE: remove the spare string for the keyboard shortcuts modal.
See #31441.

git-svn-id: https://develop.svn.wordpress.org/trunk@33509 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-29 23:19:56 +00:00
Andrew Ozz
362bb806cd TinyMCE: fix (again) the text in the keyboard shortcuts modal for the changed patterns.
See #31441.

git-svn-id: https://develop.svn.wordpress.org/trunk@33504 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-29 21:53:22 +00:00
Andrew Ozz
b1933f53dc TinyMCE: fix the text in the keyboard shortcuts modal for the changed patterns.
See #31441.

git-svn-id: https://develop.svn.wordpress.org/trunk@33501 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-29 21:06:13 +00:00
Ella Iseulde Van Dorpe
51e2bc173d Editor: word count: remove redundant script enqueuing
It is now a dependency of `post`.

Part props johnjamesjacoby.
Fixes #31766. See #30966.



git-svn-id: https://develop.svn.wordpress.org/trunk@33295 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-16 12:40:51 +00:00
Andrew Ozz
698faf3b17 TinyMCE:
- Go back to encoding the editor content only when TinyMCE is used.
- Add check and encode `</textarea>` if present.
See #32425.

git-svn-id: https://develop.svn.wordpress.org/trunk@33187 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-13 03:18:47 +00:00
Andrew Ozz
093a19b6d9 TinyMCE: add help for the text patterns to the shortcuts help popup.
See #31441.

git-svn-id: https://develop.svn.wordpress.org/trunk@33127 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-08 19:42:59 +00:00
Sergey Biryukov
f8cbb8fde8 Make "Preformatted" string in TinyMCE translatable.
props iseulde.
fixes #32862.

git-svn-id: https://develop.svn.wordpress.org/trunk@33048 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-02 12:01:00 +00:00
Andrew Ozz
8b77a613c1 TinyMCE: add the editor focusing help the Keyboard Shortcuts modal.
See #31913.

git-svn-id: https://develop.svn.wordpress.org/trunk@32957 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-26 18:48:02 +00:00
Andrew Ozz
9b671bdf9e TinyMCE: update the Keyboard Shortcuts help modal, use the TinyMCE UI API instead of an iframe.
Props iseulde, azaozz. Fixes #31913.

git-svn-id: https://develop.svn.wordpress.org/trunk@32951 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-26 04:39:11 +00:00
Andrew Ozz
dc56b51c47 Define SCRIPT_DEBUG early on every load, similarly to WP_DEBUG. Remove defined( 'SCRIPT_DEBUG' ) checks.
Fixes #32333.

git-svn-id: https://develop.svn.wordpress.org/trunk@32935 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-25 02:28:50 +00:00
Andrew Ozz
e366658072 Update the TinyMCE initialization:
- Replace `wp_htmledit_pre()` and `wp_richedit_pre()` with `format_for_editor()`.
- Replace the `'htmledit_pre'` and `'richedit_pre'` filters with `'format_for_editor'`.
- Do not run the post content through `wpautop()` in PHP when the visual editor is default. Run the textarea content through the JS wpautop on initializing TinyMCE.
- Simplify both editors initialization.
- Improve setting of `wpActiveEditor` in Quicktags.
- Improve editor.js, use `tinymce.$` when possible.
See #32425.

git-svn-id: https://develop.svn.wordpress.org/trunk@32899 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-21 22:00:42 +00:00
Ella Iseulde Van Dorpe
5bac5f7ccd TinyMCE: add wptextpattern plugin
This plugin can automatically format text patterns as you type. It includes two patterns: unordered (`* ` and `- `) and ordered list (`1. ` and `1) `). If the transformation in unwanted, the user can undo the change by pressing backspace, using the undo shortcut, or the undo button in the toolbar.

This is the first TinyMCE plugin that has unit tests and there's some good groundwork for adding tests to existing plugins in the future.

First run. See #31441.


git-svn-id: https://develop.svn.wordpress.org/trunk@32699 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-06 20:07:00 +00:00
Andrew Ozz
156df52851 Editor:
- Remove the old DFW.
- Add back-compat stub for wp-fullscreen.js.
- Keep wp_ajax_wp_fullscreen_save_post() for now.
See #30949.

git-svn-id: https://develop.svn.wordpress.org/trunk@32677 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-01 17:37:14 +00:00
Scott Taylor
f5bfbf2cad Clean up @global doc blocks/imports for class-wp-editor.php.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32543 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-22 05:09:38 +00:00
Scott Taylor
55ce3d19ea Add missing doc blocks to class-wp-editor.php.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32536 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-22 03:51:50 +00:00
Gary Pendergast
28de93d269 Remove some old backwards compatilibity code from TinyMCE.
Props azaozz.



git-svn-id: https://develop.svn.wordpress.org/trunk@32166 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-20 05:49:16 +00:00
Andrew Ozz
e66d393d1e wpLink: always show the URL field at the top.
Fixes #28206.

git-svn-id: https://develop.svn.wordpress.org/trunk@32017 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-04 21:17:22 +00:00
Andrew Ozz
62b4dd45d7 TinyMCE: remove block_formats setting, this is now the default in TinyMCE 4.1.9.
Props iseulde. Fixes #31585.

git-svn-id: https://develop.svn.wordpress.org/trunk@31735 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-11 22:56:17 +00:00
Gary Pendergast
ae391ec226 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



git-svn-id: https://develop.svn.wordpress.org/trunk@31733 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-11 22:48:16 +00:00
Dominik Schilling (ocean90)
137634176f Editor: Hide TinyMCE help button on mobile.
props MattyRob, iseulde.
fixes #31161.

git-svn-id: https://develop.svn.wordpress.org/trunk@31718 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-11 16:01:07 +00:00
Helen Hou-Sandi
507eab72c2 wpLink: Title case "Link Text", as it's an existing string.
see #28206.


git-svn-id: https://develop.svn.wordpress.org/trunk@31715 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-11 03:02:34 +00:00
Andrew Ozz
df6e920a87 wpLink: change the text label to Link text, always focus the URK field, fix Ctrl/Cmd + K shortcut. See #28206.
git-svn-id: https://develop.svn.wordpress.org/trunk@31714 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-11 03:00:15 +00:00
Andrew Ozz
bfbcfe3e6a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31713 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-11 02:39:02 +00:00
Andrew Ozz
5378b4e000 TinyMCE: add breaking out of blockquotes by pressing Enter twice. Togging blockquote on|off with the button and the shortcut is unchanged. Props avryl, fixes #23110.
git-svn-id: https://develop.svn.wordpress.org/trunk@31222 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 23:35:24 +00:00
Sergey Biryukov
1710690c99 Avoid a PHP notice in _WP_Editors::wp_fullscreen_html() when no $post global is set.
props marcochiesi.
fixes #30071.

git-svn-id: https://develop.svn.wordpress.org/trunk@31112 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 10:27:05 +00:00
Andrew Nacin
daf16cdb63 Call it 'Distraction-free writing mode' and update the help string. fixes #30657.
git-svn-id: https://develop.svn.wordpress.org/trunk@30890 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-16 10:06:17 +00:00
Andrew Ozz
276a69d6f9 TinyMCE: add another Edit translatable string for the tooltip of the Edit button on the image toolbar. Props pavelevap, see #30694.
git-svn-id: https://develop.svn.wordpress.org/trunk@30839 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-13 00:46:20 +00:00
Andrew Ozz
8f7be98176 TinyMCE: make the tooltip for the remove button in the image toolbar translatable. Props pavelevap, fixes #30694 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@30835 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-12 21:25:08 +00:00
Andrew Ozz
08021593f3 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@30757 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-06 23:52:25 +00:00
Andrew Ozz
b15ba3b995 TinyMCE: remove <address> from the block formats drop-down. Props avryl, mor10. Fixes #30132.
git-svn-id: https://develop.svn.wordpress.org/trunk@30733 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-03 20:30:09 +00:00
Drew Jaynes (DrewAPicture)
205a43ed05 Correctly capitalize JavaScript throughout core docs.
Fixes #30569.


git-svn-id: https://develop.svn.wordpress.org/trunk@30695 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-02 00:30:59 +00:00
Scott Taylor
4d46475b3d Improve various @param docs for src/wp-includes/*.
See #30224.


git-svn-id: https://develop.svn.wordpress.org/trunk@30681 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-01 01:33:34 +00:00
Andrew Ozz
3c558b7436 TinyMCE: update translatable strings, see #30560.
git-svn-id: https://develop.svn.wordpress.org/trunk@30670 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-30 22:26:56 +00:00
Andrew Ozz
59350a85ad Editor: fix warnings in class-wp-editor.php, see #30453.
git-svn-id: https://develop.svn.wordpress.org/trunk@30583 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-26 23:03:16 +00:00
Andrew Ozz
d4946a7904 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@30573 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-26 02:49:41 +00:00
Drew Jaynes (DrewAPicture)
f843741d33 Ensure inline code is markdown-escaped as such, and that code snippets in descriptions are properly indented.
Affects DocBlocks for the following core elements:
* Two arguments in `_walk_bookmarks()`
* A code snippet in the class header for `WP_Roles`
* A code snippet in the class header for `WP_HTTP_Proxy`
* Inline code fixes in the summary and a parameter description for `WP_oEmbed::discover()`
* An argument description in `_WP_Editors::parse_settings()`
* Inline code fixes in the summary and a parameter description the `embed_oembed_discover` hook.

Props rarst.
See #30473.


git-svn-id: https://develop.svn.wordpress.org/trunk@30536 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-24 04:41:15 +00:00
Andrew Ozz
5740d2206b TinyMCE: fix the tooltip for 'alignnone' button on the image toolbar. Props johnbillion, see #30147.
git-svn-id: https://develop.svn.wordpress.org/trunk@30385 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-19 17:26:18 +00:00
Mark Jaquith
78f0186866 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

git-svn-id: https://develop.svn.wordpress.org/trunk@30338 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-13 22:30:55 +00:00
azaozz
ca39f65025 Fix typo in translatable string, see #30147.
git-svn-id: https://develop.svn.wordpress.org/trunk@30319 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-13 00:59:03 +00:00
Andrew Ozz
307639954a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@30318 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-13 00:55:22 +00:00
Andrew Ozz
c8340a2cda TinyMCE: enable direct calls to _WP_Editors::wp_mce_translation(). When using TinyMCE directly, this makes it easier to load the translation of the default strings. Fixes #30293.
git-svn-id: https://develop.svn.wordpress.org/trunk@30296 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-10 02:07:00 +00:00
Andrew Ozz
d011f4ef00 TinyMCE: remove strings that are not translated before outputting the translations. Fixes #27797.
git-svn-id: https://develop.svn.wordpress.org/trunk@30294 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-10 01:59:23 +00:00
Scott Taylor
105cd50bdf In _WP_Editors::editor_settings(), $str1 and $str2 don't need to be initialized empty.
See #30224.


git-svn-id: https://develop.svn.wordpress.org/trunk@30173 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-01 23:21:07 +00:00
Gary Pendergast
0e68ecc0b6 Add wp_json_encode(), a wrapper for json_encode() that ensures everything is converted to UTF-8.
Change all core calls from `json_encode()` to `wp_json_encode()`.

Fixes #28786.



git-svn-id: https://develop.svn.wordpress.org/trunk@30055 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 18:34:16 +00:00
Andrew Ozz
1880bf988c Editor: use <button> instead of <a> for the Visual/Text buttons, make them focusable. Props afercia, fixes #27553
git-svn-id: https://develop.svn.wordpress.org/trunk@30002 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-24 01:20:42 +00:00
Andrew Ozz
a454872630 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

git-svn-id: https://develop.svn.wordpress.org/trunk@29994 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-23 02:07:15 +00:00
Sergey Biryukov
5f0598234b Use Tahoma for RTL in general and Arial for Hebrew in editor styles.
fixes #29553.

git-svn-id: https://develop.svn.wordpress.org/trunk@29773 602fd350-edb4-49c9-b593-d223f7449a82
2014-09-27 11:10:01 +00:00
Helen Hou-Sandi
1121aad86e Editor scrolling: reduce the amount of height jumping on load.
props avryl.
fixes #29307.


git-svn-id: https://develop.svn.wordpress.org/trunk@29628 602fd350-edb4-49c9-b593-d223f7449a82
2014-08-26 18:38:26 +00:00
Andrew Ozz
0ef495da6a wpLink:
- Fix adding a link on pressing Enter.
- Don't auto-focus the URL field after selecting a local link.
- Don't auto-focus the URL field when opening on touch devices. Toggle focus/blur on it to close the onscreen keyboard so the modal is positioned properly.
See #28897.

git-svn-id: https://develop.svn.wordpress.org/trunk@29333 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-31 23:27:14 +00:00
Andrew Ozz
93aff47ac5 wpLink: add keyboard navigation, improve accessibility. Props afercia, fixes #28897.
git-svn-id: https://develop.svn.wordpress.org/trunk@29321 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-29 03:15:34 +00:00
Andrew Ozz
fbfd88cecb 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@29317 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-28 23:44:28 +00:00
Andrew Ozz
9730c679f1 TinyMCE: add the 'colorpicker' and 'lists' plugins, fixes #28939, #27359.
git-svn-id: https://develop.svn.wordpress.org/trunk@29214 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-17 21:53:28 +00:00
Scott Taylor
7e05c69ce2 Cleanup after [29179]:
* `_WP_Editors::editor_settings()` no longer needs to load MEjs styles
* Make sure each identical shortcode with multiple instances also has an iframe sandbox for each instance
* For the time being, make audio and video shortcodes bypass the loading placeholder to avoid whiplash visually

Props avryl, wonderboymusic.
See #28905.


git-svn-id: https://develop.svn.wordpress.org/trunk@29187 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-16 15:39:05 +00:00
Scott Taylor
de49a2e6da _WP_Editors::editor_settings() should make use of get_editor_stylesheets().
See #28905.


git-svn-id: https://develop.svn.wordpress.org/trunk@29177 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-15 22:00:34 +00:00
Andrew Ozz
14d1e57e99 Enhance the editor on the Add/Edit Post screens, first run. Props avril, see #28328.
git-svn-id: https://develop.svn.wordpress.org/trunk@29049 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-09 22:05:06 +00:00
Sergey Biryukov
339a0e87b7 Use correct variable.
props azaozz.
see #24472.

git-svn-id: https://develop.svn.wordpress.org/trunk@28945 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-01 23:29:03 +00:00
Sergey Biryukov
44f1a76a85 Add a filter for wp_editor() settings.
props DH-Shredder, JPry, DrewAPicture.
fixes #24472.

git-svn-id: https://develop.svn.wordpress.org/trunk@28944 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-01 23:02:58 +00:00
Andrew Ozz
8d02021b7c 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
git-svn-id: https://develop.svn.wordpress.org/trunk@28568 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-24 01:43:16 +00:00
Andrew Nacin
e18e93bb80 Improve TinyMCE string for paste command browser support.
props ebinnion.
fixes #27988.


git-svn-id: https://develop.svn.wordpress.org/trunk@28220 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-25 21:19:35 +00:00
Andrew Ozz
a528be21ad Run WP_Editors::enqueue_scripts() on admin_print_footer_scripts priority 1 (later), instead of admin_footer. Fixes incompatibility with the customizer. Props feedmeastraycat, see #27853, for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@28187 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-22 22:40:33 +00:00
Andrew Ozz
cd356b6404 DFW:
- Add background color and remove the top border from the status bar (at the bottom).
- Fix spinner to always be next to the Save button.
- Remove width: auto; from .mce-fixed-width.
Fixes #27709

git-svn-id: https://develop.svn.wordpress.org/trunk@28116 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-14 08:14:01 +00:00
Andrew Nacin
e1c90794e5 TinyMCE: Always load translations, even in English, as we modify some strings.
Move a setting to after the translations filter, and remove unused strings.

see #24067.


git-svn-id: https://develop.svn.wordpress.org/trunk@28112 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-14 03:22:38 +00:00
Andrew Nacin
f7d4569c8d Add context to string added in [28097].
props azaozz.
fixes #27785.


git-svn-id: https://develop.svn.wordpress.org/trunk@28099 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-13 16:34:13 +00:00
Andrew Nacin
42f6f43c35 Add missing 'Address' string for TinyMCE.
props pavelevap, ocean90.
fixes #27785.


git-svn-id: https://develop.svn.wordpress.org/trunk@28097 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-13 16:20:54 +00:00
Andrew Ozz
3396375d47 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

git-svn-id: https://develop.svn.wordpress.org/trunk@28094 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-13 00:22:56 +00:00
Andrew Nacin
36f7e292d2 Add an explanation for 'Paste from Word' in the 'Paste from Text' dialog.
fixes #27777. see #27160.


git-svn-id: https://develop.svn.wordpress.org/trunk@28091 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-12 20:47:59 +00:00
Andrew Ozz
8aacd10a8c Don't include the non-minified tinymce.js in /build. Load it when running from /src, else load wp-tinymce.js.gz (production) or tinymce.min.js (SCRIPT_DEBUG). Props nacin, fixes #27739
git-svn-id: https://develop.svn.wordpress.org/trunk@28081 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-11 22:16:01 +00:00
Andrew Nacin
5dd9108e48 Editor: Ensure the link dialog does not display when styles are missing.
props mattheu.
fixes #27605.


git-svn-id: https://develop.svn.wordpress.org/trunk@28071 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-11 03:08:23 +00:00
Andrew Ozz
0d6b3f3e3f TinyMCE: make sure vertical resizing and menubar show/hide are set to default for each instance, fixes #27724
git-svn-id: https://develop.svn.wordpress.org/trunk@28059 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-08 18:57:18 +00:00
Andrew Ozz
61d17c2163 DFW:
- Move the word count and "Just Write" to a fixed bar at the bottom.
- Fix responsive mode to 480px. Narrower screens will have a scroll bar.
- Hide the Help button on screens < 480px, move the Save button to the right, make it bigger to match the others, and other responsive mode fixes.
Fixes #26907, see #27709

git-svn-id: https://develop.svn.wordpress.org/trunk@28043 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-08 07:48:55 +00:00
Andrew Nacin
288b1fd4f3 Nuke the TinyMCE help dialog as it is duplicated by help tabs. This leaves just Keyboard Shortcuts.
fixes #27100.


git-svn-id: https://develop.svn.wordpress.org/trunk@28032 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-08 02:31:02 +00:00
Andrew Ozz
4360d117e2 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

git-svn-id: https://develop.svn.wordpress.org/trunk@28027 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-07 23:52:55 +00:00
Drew Jaynes (DrewAPicture)
c386c17457 Improve hook docs for the wp_enqueue_editor hook, added in 3.9.
See #16284, #27700.


git-svn-id: https://develop.svn.wordpress.org/trunk@28026 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-07 23:08:46 +00:00
Andrew Ozz
e28f610ead 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
git-svn-id: https://develop.svn.wordpress.org/trunk@28024 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-07 22:54:13 +00:00
Andrew Ozz
53ce07bf36 TinyMCE:
- Tighten up button styles, add :hover for .mce-active buttons.
- Pad only the first toolbar row and remove the padding in both toolbars if the editor doesn't have a DFW mode.
Part props avryl, see #27279

git-svn-id: https://develop.svn.wordpress.org/trunk@27978 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-07 01:09:38 +00:00
Andrew Ozz
36f0a60829 Throw a user notice when the editor ID used for TinyMCE contains brackets, props nacin, fixes #27601
git-svn-id: https://develop.svn.wordpress.org/trunk@27950 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-05 01:10:19 +00:00