Neil Jenkins
389daab664
If ctrl/meta held down, key is not inserting text
2018-03-26 10:06:01 +01:00
Neil Jenkins
b0ac7d32d0
Handle all cases of overwriting content
...
Modern browsers tell you which character will be inserted with event.key, so
we can make sure we handle content deletion ourselves in these cases too.
2018-03-18 10:40:03 +00:00
Neil Jenkins
9dda7cc845
Fix FF does not leave <a> on space
2018-03-18 10:34:12 +00:00
Neil Jenkins
833d7dfdbd
New (increase|decrease)ListLevel algorithms
...
Fixes #287
2017-08-15 11:11:48 +10:00
Neil Jenkins
48fabd491a
Improved algorithm for inserting tree into range
...
Fixes #283
2017-07-19 14:29:16 +02:00
Neil Jenkins
bb593e879a
Don't insert <br> inside end of <a> on enter
...
Fixes #271
2017-03-21 17:06:44 +11:00
Neil Jenkins
9596f4ecf8
Ensure moving boundaries up tree never passes root
2017-01-13 15:15:59 +11:00
Neil Jenkins
6f83f23881
Fix delete behaviour
...
1. Fixes cursor position when deleting starting with a selection at beginning
of block.
2. Fixes block disappears when whole inline contents is deleted.
2017-01-10 10:06:28 +11:00
Islam Sharabash
6a9582c7e7
Allowing arbitrary nesting for bullets
...
This allows any level of indentation for bullets. It does this by introducing
invalid HTML. In particular, you can make bullets like:
<ul>
<ul>
<li>foo</li>
</ul>
</ul>
2016-09-27 05:50:59 +04:00
Neil Jenkins
d4abc182c8
If selection, delete contents before letting brower insert space
...
Fixes #213
2016-07-14 11:31:11 +10:00
Neil Jenkins
f593d8ac04
Enforce sane focus/blur events.
...
Because focus/blur events are fired synchonously, browsers can get confused if
UI code starts focusing other elements while inside a focus/blur handler, and
end up firing events in the wrong order which can cause infinite loops.
This change ensures we only get a focus/blur event when they really are
happening, and you always get one then the other.
2016-06-10 11:02:24 +10:00
Neil Jenkins
6c4f8e1aaf
Add support for default <a> attributes
...
Resolves #186 .
2016-05-05 11:50:36 +10:00
Neil Jenkins
923a0efd1a
Fix delete/backspace removing content outside editor
2016-03-26 11:20:28 +11:00
Neil Jenkins
6a348e084b
Make Squire work without an iframe(!)
2016-03-23 17:41:09 +11:00
Neil Jenkins
62616ef4ec
Add saveUndoState method to public API
...
For #174
2016-03-11 15:58:32 +11:00
Neil Jenkins
6bafa1d140
Run fixContainers before merging blocks.
...
In case paste or something has got the document into a weird state with inline
content not inside a block.
2016-02-26 14:28:53 +11:00
Neil Jenkins
7330324d92
Fix Firefox throws error if initialised with display:none
...
Fixes #168 .
2016-01-06 14:38:53 +11:00
Neil Jenkins
93f7867214
Fix Meta-Left/Right handling in Firefox.
...
Fixes #167 .
2015-12-29 11:15:01 +11:00
Neil Jenkins
9ccf765ba8
Scroll cursor into view after setting selection.
...
Fixes #162 and fixes #165 .
2015-12-09 15:12:47 +11:00
Neil Jenkins
bf8f796ea4
Add shift-tab keyboard shortcut.
...
If at beginning of list item, shift-tab decreases indent (to mirror tab to indent).
2015-11-17 16:50:55 +11:00
Neil Jenkins
162ec9049e
Make scroll on enter logic independent of CSS.
...
Fixes #149 .
2015-10-23 17:05:32 +01:00
Trey Cordova
85c9002ce5
Add tab nesting capability to list items with text in them;
...
- This requires your cursor to be at the beginning of the list item.
- This implementation mimics Google Docs.
2015-10-23 14:22:04 +02:00
Neil Jenkins
0ec3c43791
Don't prevent default on tab unless doing something.
...
Fixes #131 .
2015-09-04 18:33:11 +01:00
Neil Jenkins
8d764f6638
Fix Chrome may replace <div> with <br> if you delete all content.
...
Fixes #108 .
2015-07-13 06:39:07 -07:00
Neil Jenkins
a8fcd55cf4
Make event.preventDefault() cancel default key actions.
...
Fixes #107
2015-07-13 09:25:44 +07:00
Neil Jenkins
4f010a5de0
Override page up/down to match expected platform behaviour.
2015-06-25 11:02:56 +07:00
Neil Jenkins
395a5825e9
Split cleaning fns and clipboard handlers into separate file.
2015-06-19 14:18:32 +07:00
Neil Jenkins
09167c73e4
Make it possible to delete an <img> with display other than inline
...
Based on pull request #85 from dryoma.
2015-06-17 17:18:34 +07:00
Neil Jenkins
223060ecf9
Add method to set key handlers.
...
Resolves #70
2015-04-29 11:16:11 +07:00