* Merges pr-2680
* Handle end/beginning of node/text: we have to return 1 in order not to break jumping to next/previous node
* Update emojis example to insert emojis as plain text with shift+click.
* Fix eslint issues
* Revert "fix(firefox): fixed the bug that happens when changing the focus from one field to another (#2236)"
This reverts commit 6aba4260f84a4ffe6ccbe60078c95f7c39a8a6c0.
* Fixes issue where focusing on editor always placed caret at offset 0
* Inlines `selectionsEqual` logic and adds some comments
When drag-and-dropping nodes within the same editor, the removal of
the dragged nodes can cause paths and offsets to change. This is
really hard to compensate for.
Instead of compensating for it, rearranging the order things happen
mean we are always working with a document in a reasonable state.
Now, we:
1. Fire a MouseUp event on `event.target` (because we haven't done
anything, it's guaranteed to exist)
2. Save the range we're dragging (for later)
3. Select the target range (because we haven't deleted anything, this
is still valid)
4. Delete the range we're dragging (this will automatically adjust the
editor's selection)
5. Insert the dragged fragment at the current range
No matter where we're dragging from or to, these should all be
pointing at places that both exist, and haven't changed.
* fix React warnings on renderMark, renderBlock, renderDecoration
* included decorateNode and relocated code into constants in EventHandler
* Put decorateNode and render handlers into a seperate file.
* fix indentation
* overlooked indentation.
* deleteBackwardAtRange now works when offset is equal to n
Closes#2965
* Adds test to verify behaviour of `deleteBackwardAtRange` when offset===length
* Fix typo & remove useless check
* No need to check the end of the selection, as this part is called after the
`deleteExpanded` call. Selection is collapsed at this point.
* Fix insertFragment selection not place properly
It were trying to add those marks that are passed to the function to the existing once,
but it should replace them instead.
Example error behavior was:
* put cursor at the end of the marked text
* toggle marks
* enter text
expected:
text is being added without toggled marks
actual:
text is added with those marks applied
`match` get's used a number of times within the slate/schema.md but it does not appear to be explicitly defined anywhere. This term seems like a great candidate for the Glossary.
* Mutate newDirtyPaths instead of creating a new array every iteration
* Switch to map + Array.prototype.concat.apply to improve readability
* Update editor.js
* Fix renderBlock() in paste-html example
It appears that render block is missing a case for rendering `paragraph`. Without this paragraphs are being rendered as `<div>`s.
* Fixed lint error
* fix: Unknown event handler property `onEvent`
```
index.js:1 Warning: Unknown event handler property `onEvent`. It will be ignored.
in div (created by Content)
in Content (created by Editor)
```
* fix: make onEvent required
Seems this prop is provided in `component/editor.js`
* fix(firefox): fixed the bug that happens when changing the focus from one field to another
* Publish
- slate-base64-serializer@0.2.69
- slate-html-serializer@0.7.8
- slate-hyperscript@0.10.8
- slate-plain-serializer@0.6.8
- slate-prop-types@0.4.67
- slate-react@0.18.11
- slate-simulator@0.4.67
- slate@0.41.3
* Publish
- slate-base64-serializer@0.2.70
- slate-html-serializer@0.7.9
- slate-hyperscript@0.10.9
- slate-plain-serializer@0.6.9
- slate-prop-types@0.4.68
- slate-react@0.18.12
- slate-simulator@0.4.68
- slate@0.41.4
* Publish
- slate-react@0.18.13
* Revert "Fix an occasional crash in Firefox in isInEditor (#2229)"
This reverts commit 1ff050265bbcb8e6d5b5bbf9dc8839f1c6a2ddef.
* fix(firefox): added postinstall script to the main project
* fix(firefox): removed error causing line
* fix(firefox): added the right fix for this
* fix(firefox): added the best fix for this
* fix(firefox): made the range a constant
* fix(firefox): added the removeAllRanges inside the if wrapper
* fix(lint): fixed lint error
* fix(versions): removed changes for the package.json files
* fix(versions): removed remaining changes for the package.json files
* fix(conflict): fixed the issue that resolving the conflicts caused last time
* fix(lint): fixed the last lint error
* chore(content): moved comment in setTimeout to see why git is not showing conflicts locally