0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2025-02-01 20:01:27 -05:00
Squire/source
Neil Jenkins c5a7c622fe Preserve target block formatting when pasting inline text
If you have a document like this:

<div style="font-size:20px">XXXX</div>
<div style="font-size:14px">YYYY</div>

and you select the YYYY text and copy it, we just copy the text to the clipboard
and not the block formatting. This is fine.

Now you select XXXX and paste. Because that removes all content from the first
block we were replacing it with the block formatting from the clipboard. But
this has no block formatting, so you essentially just "lost" the font-size:20px,
which broke user expectations.

(If the copied text *did* have block formatting, then replacing the block is
the correct thing to do in this case, which we still do.)
2020-02-24 14:50:22 +11:00
..
Clean.js Preserve all span attributes 2020-02-24 14:50:03 +11:00
Clipboard.js Handle clipboard on iOS again 2019-11-17 10:21:33 +08:00
Constants.js Allow class names to be configured 2018-07-12 15:22:18 +10:00
document.html Require <html data-squireinit="true"> to auto-instantiate. 2015-07-06 12:19:21 +07:00
Editor.js Improve link detection regexp. 2020-02-24 14:48:46 +11:00
exports.js Export useful Node helper functions 2016-12-07 18:42:48 +11:00
intro.js make it possible to replace the reference to e.fragment in willPaste event, also add isDefaultPrevented method to that event 2015-05-01 14:07:28 -04:00
KeyHandlers.js Add config.addLinks 2019-12-30 13:14:33 +11:00
Node.js Don' use default block style to replace <br>s 2020-02-24 14:46:41 +11:00
outro.js Add support for the AMD 2015-07-14 00:33:38 +08:00
Range.js Preserve target block formatting when pasting inline text 2020-02-24 14:50:22 +11:00
TreeWalker.js Make TreeWalker filter argument optional 2018-07-27 09:22:06 +10:00