Andrew Ozz
3807829ac4
TinyMCE: if the current editor configuration is without toolbars, prevent errors when adding the labels for custom shortcuts.
...
Fixes #38063 .
Built from https://develop.svn.wordpress.org/trunk@38997
git-svn-id: http://core.svn.wordpress.org/trunk@38939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 20:07:32 +00:00
Andrew Ozz
11e7d3d250
TinyMCE: revert removing the numbers (2-6) after the headings in the drop-down. Seems it causes more confusion.
...
See #27159 .
Built from https://develop.svn.wordpress.org/trunk@38946
git-svn-id: http://core.svn.wordpress.org/trunk@38889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 06:16:30 +00:00
Andrew Ozz
ed2e427b9d
TinyMCE: remove the numbers (2-6) after the headings in the drop-down. These are previews for the actual styling of headings in the editor.
...
See #27159 .
Built from https://develop.svn.wordpress.org/trunk@38939
git-svn-id: http://core.svn.wordpress.org/trunk@38882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 01:42:48 +00:00
Andrew Ozz
913926c1bd
TinyMCE: make keyboard shortcuts more discoverable by adding them to the buttons tooltips and in the Formats drop-down.
...
Props mor10, azaozz.
Fixes #38063 .
Built from https://develop.svn.wordpress.org/trunk@38897
git-svn-id: http://core.svn.wordpress.org/trunk@38840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 01:40:31 +00:00
Andrew Ozz
37018fded6
TinyMCE: fix the calculation for the inline toolbar vertical position.
...
Fixes #37481 .
Built from https://develop.svn.wordpress.org/trunk@38160
git-svn-id: http://core.svn.wordpress.org/trunk@38101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-27 02:59:31 +00:00
Andrew Ozz
ba81f46c64
TinyMCE: replace the editor iframe title on MacOS to fix the help shortcut.
...
Props afercia, azaozz.
Fixes #36863 .
Built from https://develop.svn.wordpress.org/trunk@38110
git-svn-id: http://core.svn.wordpress.org/trunk@38051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 01:39:31 +00:00
Andrew Ozz
532e8f0204
TinyMCE: preserve <script>
and <style>
tags inside the editor.
...
Uses image placeholders for the tags and makes then visible. That way the tags can also be deleted from inside the editor.
Props iseulde, azaozz.
Fixes #32923 .
Built from https://develop.svn.wordpress.org/trunk@38039
git-svn-id: http://core.svn.wordpress.org/trunk@37980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-12 22:09:31 +00:00
Andrew Ozz
c4af09a2b9
TinyMCE, inline link dialog:
...
- Reset the internal state when doing `unlink`, pressing `Escape`, and clicking elsewhere in the editor.
- Add the unlink shortcut from the wplink plugin as it triggers the new `wp_unlink` command.
Fixes #36781 , #36732 , #37153 .
Built from https://develop.svn.wordpress.org/trunk@37906
git-svn-id: http://core.svn.wordpress.org/trunk@37847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-29 09:42:30 +00:00
Ella Iseulde Van Dorpe
cf51b75834
TinyMCE: fix inline toolbar positioning
...
Introduced in [37000].
See 2fb8aa48e9
.
See 5734a8d880
.
Fixes #36876 .
Built from https://develop.svn.wordpress.org/trunk@37559
git-svn-id: http://core.svn.wordpress.org/trunk@37527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-25 15:13:28 +00:00
Aaron Jorbin
262f3f2f7e
Update grunt-contrib-uglify from ~0.10.0 to ~1.0.1
...
This changes every JS file in WordPress, so we need to test everything.
Props netweb.
See #36520 .
Built from https://develop.svn.wordpress.org/trunk@37212
git-svn-id: http://core.svn.wordpress.org/trunk@37178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-15 16:10:37 +00:00
Andrew Ozz
cb0565b33a
TinyMCE: after discussion in Slack https://wordpress.slack.com/archives/core/p1458164584000700
...
- Remove `***` and `___` text pattern and support for spaces in `---`. The only `<hr>` text pattern is 3 or more dashes, no spaces.
- Remove the `*`, `**`, `_`, and `__` text patterns for bold and italic.
Fixes #33300 ;
Built from https://develop.svn.wordpress.org/trunk@37023
git-svn-id: http://core.svn.wordpress.org/trunk@36990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-16 23:00:28 +00:00
Andrew Ozz
a0978ec8b4
TinyMCE: then toggling the paste in plain text mode disable the warning message after the second time.
...
Fixes #28612 .
Built from https://develop.svn.wordpress.org/trunk@36807
git-svn-id: http://core.svn.wordpress.org/trunk@36774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-02 22:10:27 +00:00
Andrew Ozz
fdc538940d
TinyMCE textpattern: Horizontal line
is translated, Horizontal rule
is not.
...
See #33300 .
Built from https://develop.svn.wordpress.org/trunk@36762
git-svn-id: http://core.svn.wordpress.org/trunk@36729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-28 19:18:26 +00:00
Andrew Ozz
d0b708fcb9
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 .
Built from https://develop.svn.wordpress.org/trunk@36761
git-svn-id: http://core.svn.wordpress.org/trunk@36728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-28 19:00:27 +00:00
Andrew Ozz
2bb20c33fa
TinyMCE, inline link:
...
- Make sure the inline dialog is not showing under the advanced modal.
- Fix checking if the link node contains text.
- Fix undo levels so all actions can be undone and redone.
See #33301 .
Built from https://develop.svn.wordpress.org/trunk@36716
git-svn-id: http://core.svn.wordpress.org/trunk@36683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-26 00:21:26 +00:00
Andrew Ozz
acb6cb1d74
TinyMCE: fix the regex that removes spaces from empty paragraphs. Was causing problems when wpautop is disabled and there are many U+00A0 chars between the opening <p>
and an inline tag. These chars are inserted by the browsers to maintain consecutive spaces typed by the users in contentEditable.
...
Fixes #35890 .
Built from https://develop.svn.wordpress.org/trunk@36597
git-svn-id: http://core.svn.wordpress.org/trunk@36564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 19:56:27 +00:00
Ella Iseulde Van Dorpe
3663a5bca5
TinyMCE: add inline link dialog
...
First run.
Links the advanced button to the "old" dialog for now.
See #33301 .
Built from https://develop.svn.wordpress.org/trunk@36384
git-svn-id: http://core.svn.wordpress.org/trunk@36351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-23 00:08:26 +00:00
Andrew Ozz
7e1c68ea78
TinyMCE:
...
- Fix the inline toolbar on images in iOS, move it out of the way so the default inline toolbar is not over it.
- Fix selecting images on touch in the editor (iOS Safari fails to select them most of the time).
Fixes #34557 .
Built from https://develop.svn.wordpress.org/trunk@35607
git-svn-id: http://core.svn.wordpress.org/trunk@35571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-11 03:27:25 +00:00
Andrew Ozz
8b3c5fb300
TinyMCE: always remove trailing <br>
added by WebKit browsers to the clipboard.
...
Fixes #34642 .
Built from https://develop.svn.wordpress.org/trunk@35597
git-svn-id: http://core.svn.wordpress.org/trunk@35561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-10 04:32:25 +00:00
Scott Taylor
e649fabb6a
Accessibility: add missing alt
attributes to a gaggle of <img>
s.
...
Props afercia.
Fixes #34583 .
Built from https://develop.svn.wordpress.org/trunk@35567
git-svn-id: http://core.svn.wordpress.org/trunk@35531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-07 16:12:27 +00:00
Ella Iseulde Van Dorpe
bafdd96ebf
TinyMCE: add lang attribute
...
This is needed to make `hyphens: auto;` work correctly.
Fixes #32555 .
Built from https://develop.svn.wordpress.org/trunk@35217
git-svn-id: http://core.svn.wordpress.org/trunk@35183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-16 10:11:27 +00:00
Ella Iseulde Van Dorpe
718271dd53
TinyMCE: fix inline toolbar repositioning for inline editors
...
Fixes #33286 .
Built from https://develop.svn.wordpress.org/trunk@33592
git-svn-id: http://core.svn.wordpress.org/trunk@33559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-06 21:35:25 +00:00
Andrew Ozz
63d1389143
TinyMCE: fix initializing the editor on switching Text => Visual when the Text editor is loaded first.
...
Props stuartshields, peterwilsoncc, netweb, azaozz. Fixes #33192 .
Built from https://develop.svn.wordpress.org/trunk@33527
git-svn-id: http://core.svn.wordpress.org/trunk@33494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-02 20:01:26 +00:00
Andrew Ozz
c96977e083
TinyMCE: fix (again) the text in the keyboard shortcuts modal for the changed patterns.
...
See #31441 .
Built from https://develop.svn.wordpress.org/trunk@33504
git-svn-id: http://core.svn.wordpress.org/trunk@33471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 21:54:24 +00:00
Andrew Ozz
c9871174d1
TinyMCE: fix the text in the keyboard shortcuts modal for the changed patterns.
...
See #31441 .
Built from https://develop.svn.wordpress.org/trunk@33501
git-svn-id: http://core.svn.wordpress.org/trunk@33468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 21:07:23 +00:00
Mark Jaquith
0e28880a17
Fill empty TinyMCE paragraphs with a dummy <br />
on all browsers.
...
fixes #33151
props iseulde
Built from https://develop.svn.wordpress.org/trunk@33461
git-svn-id: http://core.svn.wordpress.org/trunk@33428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-28 14:12:25 +00:00
Andrew Ozz
a92b1d02ae
TinyMCE: remove role=tab from the keyboard shortcuts help dialog.
...
See #33031 .
Built from https://develop.svn.wordpress.org/trunk@33430
git-svn-id: http://core.svn.wordpress.org/trunk@33397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-26 21:37:24 +00:00
Andrew Ozz
170eef2e93
TinyMCE: fix accessibility for the keyboard shortcuts help dialog.
...
Props afercia, azaozz. Fixes #33031 .
Built from https://develop.svn.wordpress.org/trunk@33429
git-svn-id: http://core.svn.wordpress.org/trunk@33396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-26 19:14:26 +00:00
Andrew Ozz
87aaf3bcfe
TinyMCE: restore support for <script>
tags.
...
See #33083 .
Built from https://develop.svn.wordpress.org/trunk@33414
git-svn-id: http://core.svn.wordpress.org/trunk@33382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-24 22:04:25 +00:00
Ella Iseulde Van Dorpe
24594de8d4
TinyMCE: inline toolbar: fix memory leaks
...
Part props ungestaltbar.
Fixes #32873 .
Built from https://develop.svn.wordpress.org/trunk@33294
git-svn-id: http://core.svn.wordpress.org/trunk@33266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-16 11:11:24 +00:00
Andrew Ozz
0241081bae
TinyMCE, shortcuts help popup: do not use translatable strings for the keys.
...
See #31441 .
Built from https://develop.svn.wordpress.org/trunk@33170
git-svn-id: http://core.svn.wordpress.org/trunk@33142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-11 22:37:24 +00:00
Andrew Ozz
7e51b698c6
TinyMCE: when deleting an image, ensure the wrapping link (if any) is deleted too. Fixes the erroneous showing of the link toolbar after deleting an image. Also small readability fix.
...
See #32604 .
Built from https://develop.svn.wordpress.org/trunk@33141
git-svn-id: http://core.svn.wordpress.org/trunk@33112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-09 00:25:25 +00:00
Andrew Ozz
cacf51c3ec
TinyMCE: add help for the text patterns to the shortcuts help popup.
...
See #31441 .
Built from https://develop.svn.wordpress.org/trunk@33127
git-svn-id: http://core.svn.wordpress.org/trunk@33098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-08 19:43:24 +00:00
Andrew Ozz
5919fdd4c9
TinyMCE: update to 4.2.1. Changelog: https://github.com/tinymce/tinymce-dist/blob/master/changelog.txt .
...
Fixes #32801 .
Built from https://develop.svn.wordpress.org/trunk@33013
git-svn-id: http://core.svn.wordpress.org/trunk@32984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-01 00:52:25 +00:00
Andrew Ozz
81d0434421
TinyMCE: prevent undefined error in toolbar.hide()
.
...
See #32604 .
Built from https://develop.svn.wordpress.org/trunk@32968
git-svn-id: http://core.svn.wordpress.org/trunk@32939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 02:24:25 +00:00
Andrew Ozz
7a4c8d8977
TinyMCE: add the editor focusing help the Keyboard Shortcuts modal.
...
See #31913 .
Built from https://develop.svn.wordpress.org/trunk@32957
git-svn-id: http://core.svn.wordpress.org/trunk@32928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-26 18:49:25 +00:00
Andrew Ozz
561ca94998
TinyMCE: update the Keyboard Shortcuts help modal, use the TinyMCE UI API instead of an iframe.
...
Props iseulde, azaozz. Fixes #31913 .
Built from https://develop.svn.wordpress.org/trunk@32951
git-svn-id: http://core.svn.wordpress.org/trunk@32922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-26 04:40:24 +00:00
Andrew Ozz
e4758f42e5
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 .
Built from https://develop.svn.wordpress.org/trunk@32899
git-svn-id: http://core.svn.wordpress.org/trunk@32870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-21 22:01:28 +00:00
Ella Iseulde Van Dorpe
fd95002b2a
Editor: restructure word count
...
* The WordCounter should only do one thing: count words. This makes it also easier to test.
* Add some really basic unit tests.
* Instead of only refreshing the count on enter and delete, refresh the count when the user stops typing. Also look at paste and content changes in TinyMCE.
* Use `match` instead of `replace` when it is appropriate.
* More readable code.
See #30966 . Fixes #26620 .
Built from https://develop.svn.wordpress.org/trunk@32856
git-svn-id: http://core.svn.wordpress.org/trunk@32827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 10:35:26 +00:00
Ella Iseulde Van Dorpe
1c586b9390
TinyMCE: show inline toolbar after scroll/resize
...
Also:
* Reduce the amount of callbacks.
* Move everything under `preinit` (but prepend to the callback). The API shouldn't be availbale earlier, and some UI is not available yet, neither is `editor.dom`.
* Hide the toolbar if the target is out of view.
See #32604 .
Built from https://develop.svn.wordpress.org/trunk@32831
git-svn-id: http://core.svn.wordpress.org/trunk@32802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-18 11:10:25 +00:00
Ella Iseulde Van Dorpe
8fba763f37
TinyMCE: show active inline toolbar after focus
...
This makes sure that e.g. the image toolbar shows up again after closing the media library modal.
See #32604 .
Built from https://develop.svn.wordpress.org/trunk@32818
git-svn-id: http://core.svn.wordpress.org/trunk@32789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-17 07:08:25 +00:00
Ella Iseulde Van Dorpe
a31d79196d
TinyMCE: improve reposition method inline toolbars
...
* Make sure the toolbar does not overlap the target, unless it is higher than half the visible editor area's height.
* Allow the toolbar to have the preference to position itself above or below the target.
* Cache DOM lookups.
* Simplify the logic and fix various positioning issues.
See #32604 .
Built from https://develop.svn.wordpress.org/trunk@32816
git-svn-id: http://core.svn.wordpress.org/trunk@32787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-17 04:42: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
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
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
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
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
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
Mark Jaquith
7c4b9419f4
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
Built from https://develop.svn.wordpress.org/trunk@30338
git-svn-id: http://core.svn.wordpress.org/trunk@30337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-13 22:31:22 +00:00