Commit Graph

53 Commits

Author SHA1 Message Date
Andrew Ozz
1824884b75 Reorder quicktags.js a bit to account for the order of defining vars and functions after [43577].
See #44371.
Built from https://develop.svn.wordpress.org/trunk@43579


git-svn-id: http://core.svn.wordpress.org/trunk@43408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-20 13:34:25 +00:00
omarreiss
bdbaccce37 General: Explicitly assigns all JS globals to the window.
Many variables in the JavaScript were defined in the global scope without being explicitly assigned to the window. When built with Webpack, the code gets encapsulated in anonymous functions and those implicit globals get assigned to the wrong scope. This patch prevents that from happening.

Fixes #44371. See #43731.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-19 13:33:24 +00:00
atimmer
bde558be2f Docs: Add file doc @output annotations.
These annotations make it clear to the reader of a JavaScript source
where the build process outputs to. These annotations can later be
integrated in a webpack configuration. This way there is one source of
truth.

The `build` folder is omitted from the paths, because a single JS file
shouldn't not be responsible of knowing where outputs in general will
end up at. A file only knows its output location relative to the
project.

Props adamsilverstein, herregroen, omarreiss, pento.
Fixes #44361.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:30:15 +00:00
Andrew Ozz
57ef33fa2a Editor: manually trigger change event when text is modified from JS.
Props westonruter.
Fixes #40726.
Built from https://develop.svn.wordpress.org/trunk@40615


git-svn-id: http://core.svn.wordpress.org/trunk@40485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 00:29:41 +00:00
Andrew Ozz
0b2f789e93 Editor: Add init and remove methods to Quicktags.
Props helgatheviking azaozz.
Fixes #26183 #40708.
Built from https://develop.svn.wordpress.org/trunk@40598


git-svn-id: http://core.svn.wordpress.org/trunk@40468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 02:47:42 +00:00
Andrew Ozz
17eef2deeb Editor quickTags: when the user selects some text by triple-clicking, then wraps it in a tag, and the last selected char is \n, insert the closing tag before the line break.
Props JoshuaGoodwin azaozz.
Fixes #29571.
Built from https://develop.svn.wordpress.org/trunk@37661


git-svn-id: http://core.svn.wordpress.org/trunk@37627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-09 00:25:27 +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
Andrew Ozz
9828f9056e Editor: add ARIA labels to the Quicktags buttons to improve accessibility.
Props afercia, azaozz. Fixes #31522.
Built from https://develop.svn.wordpress.org/trunk@32883


git-svn-id: http://core.svn.wordpress.org/trunk@32854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 02:16:25 +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
Andrew Ozz
af1e417d4e 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.
Built from https://develop.svn.wordpress.org/trunk@30573


git-svn-id: http://core.svn.wordpress.org/trunk@30563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-26 02:50:24 +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
Andrew Ozz
3ef60bf29b Quicktags: fix strict check for instance['0'], props afercia, fixes #29767
Built from https://develop.svn.wordpress.org/trunk@29889


git-svn-id: http://core.svn.wordpress.org/trunk@29645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 01:26:18 +00:00
Andrew Ozz
f1c169f2ac Quicktags: move focusing the editor after inserting content to the end of the code blocks. Fixes a bug in Chrome where both the textarea and the window may auto-scroll to unexpected position on clicking a Quicktags button. Part props avryl, fixes #29944 for trunk.
Built from https://develop.svn.wordpress.org/trunk@29884


git-svn-id: http://core.svn.wordpress.org/trunk@29640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-12 23:12:19 +00:00
Andrew Ozz
f6d0b7ff33 Quicktags: remove accesskey attributes the buttons and don't add empty title attributes, fixes #29358
Built from https://develop.svn.wordpress.org/trunk@29878


git-svn-id: http://core.svn.wordpress.org/trunk@29635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-12 00:47:19 +00:00
Andrew Ozz
bfaf007e97 Editor:
- Use standard button styles for the Quicktags buttons.
- Better style for the TinyMCE buttons (hover/focus/active/disabled).
- Move the fullscreen (DFW) button to the right.
- Better style for the Visual/Text buttons in DFW.
Props avryl, see #27279
Built from https://develop.svn.wordpress.org/trunk@27857


git-svn-id: http://core.svn.wordpress.org/trunk@27688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-29 23:58:14 +00:00
Andrew Ozz
c66f166956 TinyMCE: fix the More and Next Page tags behavior:
- Append them inside top level <p> tags.
- If the caret is not in a top level <p>, create new paragraph after the current top level tag.
- Do not change placement when edited in the Text editor.
See #27378
Built from https://develop.svn.wordpress.org/trunk@27729


git-svn-id: http://core.svn.wordpress.org/trunk@27566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-26 02:08:15 +00:00
Andrew Nacin
6adabc6e4d Various JSHint fixes. see #26446.
Built from https://develop.svn.wordpress.org/trunk@27131


git-svn-id: http://core.svn.wordpress.org/trunk@26998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-08 00:52:12 +00:00
Andrew Ozz
88959be27d TinyMCE: improve handling of Read More and Nextpage tags. See #24067, fixes #16239.
Built from https://develop.svn.wordpress.org/trunk@26941


git-svn-id: http://core.svn.wordpress.org/trunk@26821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-14 05:46: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
Andrew Ozz
b88583c567 Quicktags: fix int/string strict comparison, see #26046.
Built from https://develop.svn.wordpress.org/trunk@26553


git-svn-id: http://core.svn.wordpress.org/trunk@26444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-03 04:21:09 +00:00
Andrew Nacin
f7d30f7002 Fix JSHint errors in quicktags.js. Ignore deprecated API rather than marking it as exported globals.
props kovshenin.
fixes #26046.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-15 14:26:09 +00:00
Sergey Biryukov
58c364947f PHPDoc fixes and additions. fixes #24616.
git-svn-id: http://core.svn.wordpress.org/trunk@24490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-21 12:45:11 +00:00
Andrew Nacin
00b7fa589a Remove ancient 'lookup' quicktag from the text editor. This had called up answers.com.
props mboynes, jonbishop, SergeyBiryukov.
fixes #23322.



git-svn-id: http://core.svn.wordpress.org/trunk@24052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-22 20:17:25 +00:00
Andrew Nacin
2710bcade1 Switch to .min for compressed JS and CSS files.
* This moves our "development" versions from .dev.js to .js (same for css).
 * The compressed version then moves from .js to .min.js (same for css).

By switching to the standard .min convention, it sets expectations for developers,
and works nicely with existing tools such as ack.

fixes #21633.



git-svn-id: http://core.svn.wordpress.org/trunk@21592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-23 00:04:18 +00:00
bumpbot
81286bad53 Compress scripts/styles: 3.5-alpha-21419.
git-svn-id: http://core.svn.wordpress.org/trunk@21419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-03 22:58:18 +00:00
bumpbot
7e8ba69143 Compress scripts/styles: 3.4-beta2-20452.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-12 17:58:20 +00:00
bumpbot
a7de50f6b0 Compress scripts/styles: 3.4-alpha-20167. TinyMCE updated.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-09 23:30:29 +00:00
azaozz
83330267af Prevent errors in QTags.closeAllTags(), make it remove button states but not modify the content (as that often is wrong anyways), fixes #15911
git-svn-id: http://svn.automattic.com/wordpress/trunk@19290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-15 01:15:10 +00:00
azaozz
25f7c9a446 Bring back the Fullscreen button in Quicktags, fixes #19194
git-svn-id: http://svn.automattic.com/wordpress/trunk@19215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-08 16:53:31 +00:00
azaozz
081076f2e9 Improve handling of init and adding buttons to Quicktags, fixes #19098
git-svn-id: http://svn.automattic.com/wordpress/trunk@19172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-05 16:00:38 +00:00
azaozz
eb8878fbfc Fix wplink when TinyMCE is not loaded, fix image insertion when wpActiveEditor is not set, see #17144
git-svn-id: http://svn.automattic.com/wordpress/trunk@18766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-24 04:43:19 +00:00
azaozz
7210ddb762 Quicktags: fix closing of the first tag in an empty textarea, allow closing of all tags without the button, see #16695
git-svn-id: http://svn.automattic.com/wordpress/trunk@18727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-20 02:22:43 +00:00
azaozz
64da76d23e Fix quicktags buttons fir self-closing tags, remove unneeded arg when adding a button, see #16695
git-svn-id: http://svn.automattic.com/wordpress/trunk@18725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-19 20:47:20 +00:00
azaozz
41e5e2d81e More quicktags back-compat, see #16695
git-svn-id: http://svn.automattic.com/wordpress/trunk@18628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-02 20:40:47 +00:00
azaozz
b9d9d11f4e Fix styling and quicktags error in press this, see #16695
git-svn-id: http://svn.automattic.com/wordpress/trunk@18619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-28 20:48:05 +00:00
azaozz
6ebdf41b50 Properly reset vars, see #16695
git-svn-id: http://svn.automattic.com/wordpress/trunk@18612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-27 16:30:36 +00:00
azaozz
a8df969ac9 Improve quicktags back-compat, add method instance.getButtonElement(id), see #16695
git-svn-id: http://svn.automattic.com/wordpress/trunk@18611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-26 23:30:01 +00:00
azaozz
6041cd0410 Fix QTags.closeAllTags(), replace 'tb' with 'ed' in quicktags,js to make it clear it is the editor instance not the toolbar, small comments quick edit fixes, see #16695, fixes #15911
git-svn-id: http://svn.automattic.com/wordpress/trunk@18576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-20 19:55:51 +00:00
azaozz
35f5d1cefb Fix the "close tags" button in quicktags, props SergeyBiryukov, see #16695
git-svn-id: http://svn.automattic.com/wordpress/trunk@18575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-19 21:23:31 +00:00
azaozz
042a03f384 Fix back-compat for quicktags, introduce QTags.addButton(), see #16695
git-svn-id: http://svn.automattic.com/wordpress/trunk@18511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-05 04:09:22 +00:00
azaozz
230fb8f3e3 Refactor Quicktags, props garyc40, see #16695
git-svn-id: http://svn.automattic.com/wordpress/trunk@18497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-03 10:11:12 +00:00
azaozz
1ffb2468a5 HTML mode for Distraction Free Writing, props koopersmith, see #17136
git-svn-id: http://svn.automattic.com/wordpress/trunk@17785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-02 08:10:23 +00:00
azaozz
4f9f5f1765 Use wpLink in the HTML editor too, props koopersmith, fixes #16631
git-svn-id: http://svn.automattic.com/wordpress/trunk@17687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-23 02:12:56 +00:00
azaozz
6afab9b294 Remember scrollTop in Quicktags, props gmpfree, fixes #9161
git-svn-id: http://svn.automattic.com/wordpress/trunk@10745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-03-08 06:10:28 +00:00
azaozz
a750885c8e Minify all js and add the non-minified files as .dev.js
git-svn-id: http://svn.automattic.com/wordpress/trunk@10291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-01-02 15:08:58 +00:00
ryan
e89192b1a8 Strip trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@10150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-12-09 18:03:31 +00:00
azaozz
0c4c675dbc Fix js error on dashboard when no comments in Recent Comments module
git-svn-id: http://svn.automattic.com/wordpress/trunk@9483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-11-03 00:14:49 +00:00
azaozz
95fa29a208 Reply to comments from admin, first run, see #7435
git-svn-id: http://svn.automattic.com/wordpress/trunk@8720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-24 06:56:22 +00:00
ryan
04c9051a7d Remove trailing whites.
git-svn-id: http://svn.automattic.com/wordpress/trunk@7130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-03-02 20:17:30 +00:00
ryan
99f1babe59 i18n for quicktags.js. Props Nazgul. fixes #3958
git-svn-id: http://svn.automattic.com/wordpress/trunk@5167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-04-01 16:06:19 +00:00