1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-24 01:02:31 +01:00

3272 Commits

Author SHA1 Message Date
琚致远
2d901f6520
Update 08-rendering.md (#3520) 2020-02-27 14:49:29 -08:00
Ryan Mitts
d17a1e86e3
Added source-map-loader to the Next Webpack config to pass through the source maps from the compiles Slate libraries. (#3445) 2020-02-26 08:02:47 -08:00
Cameron Ackerman
0aaab07792
fixed some bugs with the input event handler on the embeds example (#3516)
* fixed some bugs with the input event handler on the embeds example, got rid of the non functional 'is selected and is focused' conditions for showing the input.

* fix linting error

Co-authored-by: DamareYoh <34608378+DamareYoh@users.noreply.github.com>
2020-02-26 07:48:39 -08:00
Ondrej Stanek
ad881564d8
Fix invalid example link (#3517)
Hovering menu => Hovering toolbar
2020-02-26 07:47:59 -08:00
Ryan Mitts
9504c4472c
Fix inputs from not being able to be used within void nodes in Firefox and Added example of input and other editable void nodes (#3436) 2020-02-25 20:52:11 -08:00
Efim
d8cc9fc46b
fix: check isContentEditable of target element in ReactEditor.hasDOMNode (#3389)
* fix ReactEditor.hasDOMNode

* make ReactEditor.hasDOMNode variables more clear
2020-02-25 20:50:53 -08:00
Synthetic Dream
0d6271bc15
docs: update an example's link (#3514) 2020-02-23 10:44:41 -08:00
Sunny Hirai
bd52b9d080
Use lodash throttle instead of debounce for updating selection change (#3355)
* Add lodash

* Switched debounce to lodash/throttle

* Updated yarn.lock
2020-02-22 09:08:22 -08:00
Ken Aoki
1f11276ebd
Don't use stale readOnly prop. (Fix bug #3321) (#3388) 2020-02-22 08:36:09 -08:00
Marcin Grzywaczewski
83b1319c63
Fix Paste without Formatting / Paste and Match Style producing uneditable text nodes. (#3415)
* handle plaintext-only pastes using onPaste handler, regardless of browser

* remove extra console.log; merge code paths in onPaste - they contain the same code
2020-02-22 07:57:50 -08:00
Lucas Willems
c5249c745c
Update 06-editor.md (#3511) 2020-02-21 09:14:47 -08:00
Tyler Hallada
de9d0a3912
Fix pasting plain text with newlines (#3472)
Fixes https://github.com/ianstormtaylor/slate/issues/1681
2020-02-21 08:35:24 -08:00
Björn Theart
c4eb7b37bc
Update 06-editor.md (#3510) 2020-02-21 08:22:28 -08:00
Kamil Mielnik
378820602c
Enable processing of tsx files with babel in rollup.config.js (#3474)
It should fix https://github.com/ianstormtaylor/slate/issues/3471
2020-02-20 17:58:55 -08:00
Josh McFarlin
9137a1663f
Fixed incorrect editor usage in Embed example (#3397) 2020-02-20 17:28:11 -08:00
Marco Huttunen
e9bad8c5f4
Change lernajs to correct URL (#3475) 2020-02-20 16:28:21 -08:00
Oguz Gelal
e2dd13c24d
Fix test folders name swap for interfaces/Editor/nodes mode-highest vs. mode-all (#3484) 2020-02-20 16:27:13 -08:00
Adam Sanderson
e9e1eb2524
Adds Transforms import to forced-layout (#3503)
The forced layout demo included Editor, but not Transforms, and would crash when it needed to enforce the layout.
2020-02-20 16:20:36 -08:00
Andreas Geffen Lundahl
eb181f3279
Allow zero as offset on <anchor> and <focus> inside <selection> (#3491)
* Allow zero as offset on <anchor> and <focus> inside <selection>

When creating a selection using the <selection> hyperscript tag, you couldn't
set zero as offset on <anchor> and <focus>, because of a faulty falsiness
check. This is fixed by checking if the offset is falsy and explicitly not zero.

* Make sure offset can't be null or undefined on <anchor> and <focus>

Throw exception when offset is strictly null or undefined, on <anchor> and
<focus> when creating a <selection>.
2020-02-20 16:00:59 -05:00
Ian Storm Taylor
30bc30df4b
Update Readme.md 2020-02-20 11:06:45 -05:00
Ian Storm Taylor
17ee9f8954
Update Readme.md 2020-02-20 11:04:39 -05:00
Xleine
217bdd611b fix some doc's bug (with v0.57.1) (#3393)
* fix: code blocks's info string
this info string. should be `jsx`

* fix: editor's exec invoke
now, editor.exec() is not available in Slate v0.57.1
so, use editor.insertText() to instead it

*  refactor: delete a nerver used value

* update add new chinese translate
      update chinese translate to `v0.57.1`

Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
2020-01-27 15:24:15 -05:00
Lucas Willems
8202e08102 Fix link (#3440) 2020-01-27 15:23:53 -05:00
Tyler Hallada
d341cb1592 Fix links in slate-react readme (#3428)
Fixed the "Plugins" link and changed the "Constants" link (a folder which no longer exists) to a "Hooks" link.
2020-01-27 15:23:13 -05:00
Aykut Kardaş
f813af790e An unused state was deleted. (#3413) 2020-01-27 15:22:54 -05:00
Jonathan Wieben
612dbcb3a6 Chore: Typo in docs (#3411)
* Fix: Typo in docs

It should read edit instead of editor.

* Chore: Further typo fix
2020-01-27 15:22:36 -05:00
Arnas
a69e48d3ed Fixed Getting Started url (#3407)
Getting started URL was broken
2020-01-27 15:22:19 -05:00
David Calhoun
27db5e6c45 docs: walkthroughs: make implicit React dependencies explicit (#3402) 2020-01-27 15:21:08 -05:00
David Calhoun
5797562849 readme: Documentation: fix broken url; http -> https (#3401) 2020-01-27 15:20:50 -05:00
Nikhil Vijayan
74444c28ab fix: update incorrect link (#3381) 2020-01-27 15:20:02 -05:00
Leon
8cd9b79352 Update 04-applying-custom-formatting.md (#3371) 2020-01-03 23:02:40 -08:00
cvlmtg
653690e285 update jsfiddle url (#3377) 2019-12-28 23:52:32 -05:00
Ian Storm Taylor
22d9095c39 v0.57.1 v0.57.1 2019-12-20 12:39:32 -05:00
Ziad Beyens
101661ee27 fix: Slate editor props (#3359)
* fix: Slate editor props

 TS2322: Type 'Editor' is not assignable to type 'ReactEditor'.

* revert

* generic type

* generic type

* generic type

* extends Editor

* extends Editor

* infer

* infer
2019-12-20 12:17:00 -05:00
Ian Storm Taylor
e1f4ff1f6c fix docs 2019-12-19 14:37:10 -05:00
Ian Storm Taylor
fa4ab37b02 Merge branch 'master' of github.com:ianstormtaylor/slate 2019-12-19 14:34:38 -05:00
Ian Storm Taylor
dae32cd473 update docs for removal of commands 2019-12-19 14:34:34 -05:00
Johan Sörlin
5418e260d4 moved getLeaves from react to slate core package and added some basic tests (#3358) 2019-12-19 11:51:44 -05:00
Corentin.Andre
e54b07eba8 fix: undoing and redoing are switched (#3363) 2019-12-19 11:50:32 -05:00
Sunny Hirai
3ffd73cd7d
Fix broken link in introduction of docs (#3357) 2019-12-18 18:23:05 -08:00
Sunny Hirai
cc7f035229 Added a warning for Android in faq (#3356) 2019-12-18 21:18:35 -05:00
Ian Storm Taylor
922d03e006 v0.57.0 v0.57.0 2019-12-18 16:04:05 -05:00
Jack Turnbull
6659152145 build: relax transpilation for es modules (#3337)
* build: relax transpilation for es modules

ES module output currently includes regenerator runtime functions which
can block strict content security policies. For an ES module output this
isn't required because any runtime supporting ES modules will also
support async/await natively. It is also highly likely that users of the
ES module would also be performing their own transipliation of
async/await and we should not make assumptions on their behalf (some may
prefer promises to regenerator, for example).

This commit splits the babel config into two; an unchanged one for the
UMD output, and another for module output.

* build: override babel settings from plugin
2019-12-18 15:53:59 -05:00
Ian Storm Taylor
40617e4f1a update changelog 2019-12-18 15:47:41 -05:00
Ian Storm Taylor
0bbe121d76
Remove commands (#3351)
* remove commands in favor of editor-level functions

* update examples

* fix lint
2019-12-18 15:00:42 -05:00
Ian Storm Taylor
c2d7905e19 v0.56.1 v0.56.1 2019-12-18 14:59:46 -05:00
Dylan Markow
0e4917f49b Swap remove_mark/add_mark example (#3349) 2019-12-18 12:25:54 -05:00
Christopher Biscardi
af7a7e7c45 deletebackward -> deleteforward (#3346) 2019-12-18 11:15:59 -05:00
cvlmtg
0b7644e975 fix onBeforeInput memoization (#3347)
* fix memoization of onBeforeInput callback

* fix lint

* fix callbacks dependencies
2019-12-18 11:15:17 -05:00
Ian Storm Taylor
d765cbc3a8 v0.56.0 v0.56.0 2019-12-17 23:03:12 -05:00