Commit graph

20 commits

Author SHA1 Message Date
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