Commit graph

37 commits

Author SHA1 Message Date
Dan Stillman
3f3b6501ce Update whitelist for TinyMCE 2019-09-16 00:38:47 -04:00
Dan Stillman
b718abe23e Fix incorrect prompt about URL prefix when adding links in notes
Regression in ba9f81368b. This is also a proper fix for what that was
trying to fix.
2019-07-07 21:38:35 -04:00
Dan Stillman
ba9f81368b Don't prompt to add 'http://' prefix to anchor links in notes
https://forums.zotero.org/discussion/77600/removing-the-pop-up-add-http-when-adding-an-anchor-link
2019-05-30 04:18:28 -04:00
Dan Stillman
429c175d2e Update TinyMCE to 4.9.4
This fixes the issue of newlines being lost when copying notes.
2019-04-23 05:54:23 -04:00
Dan Stillman
c3e8af9294 Update TinyMCE to 4.9.1 2018-12-04 22:45:04 -07:00
Dan Stillman
cbd8fa151d Update TinyMCE to 4.8.2
And add 'nonbreaking' plugin
2018-10-20 03:39:26 -04:00
Dan Stillman
3a3f46530d Adjust note header sizing/styling 2018-05-27 21:23:38 -04:00
Dan Stillman
90b975445e Fix note display in read-only libraries and classic citation dialog 2018-03-11 01:41:16 -05:00
Dan Stillman
c7d05ad2f9 Use 'paste' plugin from TinyMCE 4.6.7 to fix drag and drop cursor issue
https://forums.zotero.org/discussion/70720/after-copy-by-dragging-the-cursor-disappears
2018-03-08 00:17:16 -05:00
Dan Stillman
e8403b9679 Update TinyMCE to 4.7.9 2018-03-01 22:41:28 -05:00
Dan Stillman
081793f72f Disable auto_focus for TinyMCE
TinyMCE triggers a focus on the window itself, which means that the
window steals focus when an attachment is created even if another Zotero
window is in front. Instead, do a manual focus in the external note
window, which is the one place I could find where we rely on it (though
there might be others).
2018-03-01 01:20:29 -05:00
Dan Stillman
6051c245b4 Fix auto-focusing of notes in external window 2017-12-11 02:39:22 -05:00
Dan Stillman
dd0fafd41d Restore Cut/Copy/Paste to note context menu 2017-08-16 00:41:38 +02:00
Dan Stillman
b0c1a9a613 Add alignment menu to note context menu that restores justification option
(Even if it's generally a bad idea without hyphenation)

Also adds unused code that could replace the three alignment buttons in
the toolbar with a split-button menu with all four options. We could use
this if we needed more space and didn't think people would mind the
extra click when switching between left and center.
2017-07-17 16:34:48 -04:00
Dan Stillman
eb42152c42 UI fixes for read-only notes
- Don't show toolbar in read-only note editor
- Get rid of "undefined" button in CR window
- Better padding/alignment in CR window
2017-05-12 20:01:47 -04:00
Dan Stillman
850a9bb309 Fix width of note link toolbar 2017-04-19 19:35:59 -04:00
Dan Stillman
d0b1a45c61 Restore ability to paste images in notes, for now
Allow this to continue working until we have a better solution that
keeps data URIs out of note markup and is counted against file quota.
Syncing most notes with embedded images will still result in a
note-too-long error.

Closes #1209
2017-04-16 02:40:20 -04:00
Dan Stillman
12735faa92 Retain style properties when pasting content from Word/Office 2017-02-09 23:40:15 -05:00
Dan Stillman
fe063faf00 Add text color buttons to notes, and move direction to context menu
And reduce button spacing slightly to accommodate

Closes #1151
2017-02-03 15:33:05 -05:00
Dan Stillman
0998c1d1da Update TinyMCE to 4.5.2 2017-02-02 02:01:06 -05:00
Dan Stillman
bd8debb2df Use entity_encoding: 'raw' in notes
This (and some other things) will help avoid changes in uploaded notes, which
cause loss of cursor position and other problems after local notes are updated
with the server version.

A side effect is that multiple spaces won't be converted to ` `, so
anything consuming note content will have to use `white-space: pre`.

(Notes in reports appear to be substituting ` ` as necessary,
though I'm not sure where that's happening.)
2017-02-02 02:01:06 -05:00
Dan Stillman
ae47ae28bd Fix #1163, Unable to open zotero urls from tinymce 2017-01-30 14:01:04 -05:00
Dan Stillman
044ecf2157 Keep TinyMCE dialogs within frame
This isn't ideal, but it mostly works, and keeps the dialogs vertically
(if not horizontally) moveable. It would be nice if the dialogs
automatically flowed to the available width.

This could be turned off in standalone note windows above a certain
width.
2016-12-26 13:15:49 -05:00
Dan Stillman
6ec2f9aaf9 Fix newlines in note HTML files 2016-12-26 11:27:09 -05:00
Dan Stillman
e75827bf28 Widen style dropdown in note editor to accommodate other languages 2016-12-26 03:18:08 -05:00
Dan Stillman
6c260bc9c9 Localize TinyMCE
Automatically use a language pack for the current locale if one is
available
2016-12-26 03:17:48 -05:00
Dan Stillman
dc04a1231c Upgrade to TinyMCE 4.5.1
- New flat theme (with padding tightened a bit from the default to fit
  in right-hand pane)
- Adds search/replace within notes
- Adds URL autolinking
- Image pasting/dragging is now properly disallowed (though TinyMCE 4
  has hooks that may allow us to actually support this by automatically
  creating attachments)
- New blockquote style with color bar
- Replaces custom context menu on link click with built-in version

 To-do:

- Fix display of pop-ups, which are now modal dialogs within the note
  frame instead of pop-up windows, to stay fully within the frame
- Localize (more important now that there are tooltips)
- Support image dragging
- Update elements list for HTML5, for better drag-and-drop?
- Move directionality control to context menu instead of taking up
  toolbar space?
- Evaluate other plugins for potential inclusion
- Show additional controls in separate note window?
- Fix opacity of text in tooltips

Closes #451, closes #421
2016-12-25 23:19:49 -05:00
Dan Stillman
9bd2913b2a Unminify TinyMCE plugins 2015-08-27 16:07:50 +02:00
Dan Stillman
c123b4a2f9 Switch to unminified editor_template_src.js in TinyMCE code 2015-08-13 17:53:40 -04:00
Dan Stillman
b599aed8ed Fix pasting of non-HTTP URLs into notes from non-note sources
Copying zotero:// and other non-HTTP links from a note itself was fixed
in #452, but copying such links from other sources still stripped the
hrefs. This removes the patch in #452 and just gets the HTML directly
from the clipboard. I'm not sure why TinyMCE doesn't try to do this by
default (it only tries for plaintext), so maybe there's a problem with
this approach, but it seems to work for me (strips bad HTML, etc.).

Fixes #697
2015-04-10 13:08:25 -04:00
Dan Stillman
faed7cd7dd Replace some 'for each..in' instances
There are hundreds more, but these are all the ones that generate warnings in
the console at startup. XPCOM/XBL ones don't seem to do so, so we can ignore
those for now (and hopefully not bother with them on 4.0). Instances in
translators do generate warnings.

Addresses #656
2015-03-17 15:19:45 -04:00
Joscha Legewie
e4e75da24e fix copy/paste of non-http links in Notes 2014-02-05 19:09:15 +01:00
Dan Stillman
a6ab904cd0 Note link tweaks
- Send modifier keys through to loadURI() when clicking Open Link in notes
- Open link in parent window from external note window
- Don't show both menus on right-click

Follow-up from #450
2014-02-04 21:02:05 -05:00
Joscha Legewie
2f9c7fd839 TinyMCE Improvements: Open links from note window with popup and auto-create links 2014-02-04 20:58:51 -05:00
Dan Stillman
ece36438e3 Revert "Disable spellchecking in notes until it can be supported for real"
This reverts commit b82876253c.

We can just leave this alone until we have a proper fix.
2013-08-09 11:44:34 -04:00
Dan Stillman
b82876253c Disable spellchecking in notes until it can be supported for real
https://forums.zotero.org/discussion/19771/workaround-to-disable-spell-checker/

Right now you can't iteract with it (to add/ignore words) or change the
language (which is probably only English in Standalone) or disable it
(without going to about:config).
2013-08-09 11:37:29 -04:00
Dan Stillman
59550167a7 Move TinyMCE into resource://
This fixes CSS in popups and probably other things.
2013-07-12 00:40:03 -04:00