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

25 Commits

Author SHA1 Message Date
Tobias Andersen
794e705c72 remove draggable attribute from void nodes (#1731) 2018-05-01 17:38:31 -07:00
Jinxuan Zhu
6e6e9cf710 Fix spell check bug (#1753)
* Fix spell check bug by add data-text:true

* Fix spell check bug by spell check add length to a leaf

* Fix tests to use data-text:true for marks

* Rename data-text to data-slate-leaf; Remove setRef; unlift attributes in leaf

* Update examples with data-*

* Add attributes to document

* Fix renderMark in all documents

* Prettier markdown
2018-04-27 14:06:24 -07:00
Benjy Cui
fb172dec6f fix: make void node selectable for edge case, close: #1639 (#1734) 2018-04-27 13:42:53 -07:00
Blake Embrey
07788eb2d9 Replace zero width blocks with newline before copy (#1644)
* Replace zero width blocks with newline before copy

* Fix linting issue

* Fixing linting again, sorry Github
2018-02-21 12:38:56 -08:00
Renaud Chaput
3339d088e1 Add Prettier with ESLint integration (#1589)
* Add Prettier, with basic config and ESLint integration

* Apply Prettier to all files using `yarn lint --fix`

* Tell Prettier to ignore an empty text in a test output.

* Run Prettier on JS files not handled by ESLint, and lint them too
2018-02-06 15:12:00 -08:00
Conor Cussell
62ffb4681b Remove parse5 (#1531)
Fix stripUnwantedAttrs

Remove .only

Remove parse5 from deps

Better imports

Cleanup

More succint removal of attributes
2018-01-13 15:41:48 -08:00
AlbertHilb
64eb1169af Render text inside void nodes with a zero-width space. (#1388)
So the node can contain selection but the text is not
visible.
2017-11-11 15:35:30 -08:00
Blake Embrey
40def34e5b Fix native IME input at the beginning of a line (#1353) 2017-10-31 18:11:07 -07:00
Blake Embrey
f9f7d34304 Avoid rendering an empty placeholder by default (#1356) 2017-10-31 08:32:36 -07:00
Yifeng Wang
97002a4835 replace <br /> to line break (#1322) 2017-10-28 14:41:03 -07:00
Ian Storm Taylor
adb2678732
Rename "state" to "value" everywhere (#1313)
* rename state to value in slate core, as deprecation

* rename all references to state to value in slate core

* migrate slate-base64-serializer

* migrate slate-html-serializer

* migrate slate-hyperscript

* migrate slate-plain-serializer

* migrate slate-prop-types

* migrate slate-simulator

* fix change.setState compat

* deprecate references to state in slate-react

* remove all references to state in slate-react

* remove `value` and `schema` from props to all components

* fix default renderPlaceholder

* fix tests

* update examples

* update walkthroughs

* update guides

* update reference
2017-10-27 13:39:06 -07:00
Ian Storm Taylor
5ba34c1152 fix rendering tests 2017-10-26 16:25:32 -07:00
Ian Storm Taylor
509d3d50fc remove rendering from schema & make it expressive (#1262)
* split rendering out of schema

* remove default components

* first stab at new schema

* make default normalizations smarter

* revert to forcing defaults to be verbose?

* refactor reason constants

* split nodes into blocks/inlines

* get tests passing

* restructure schema tests

* add parent test

* cleanup

* remove defaults from schema

* refactor schema rule.nodes validation, update example

* embed schema in state objects

* fixes

* update examples, and fixes

* update walkthroughs

* update docs

* remove old schemas doc page

* add more tests

* update benchmarks
2017-10-25 17:32:29 -07:00
Ian Storm Taylor
443be389c3 fix tests 2017-10-25 15:35:32 -07:00
AlbertHilb
fe0d7fd1ce Reshape Void component. (#1265)
* Reshape `Void` component.
Add some cases where editor blur should be prevented.

* Update tests.
2017-10-25 15:32:10 -07:00
Ian Storm Taylor
11b2003f53 Remove data (#1244)
* remove data from event handler signatures

* standardize known transfer types

* add setEventTransfer to docs

* update examples, fix drag/drop

* fix tests and draggable attribute setting
2017-10-16 21:04:16 -07:00
Ian Storm Taylor
35e8978655 remove void spacers in readonly, add tests 2017-10-14 10:10:47 -07:00
Ian Storm Taylor
576fb5a133 tweak void styles, fix tests 2017-10-13 18:05:05 -07:00
Ian Storm Taylor
41b3c80f11 fix tests 2017-10-13 15:43:59 -07:00
Renaud Chaput
e960918f87 Upgrade to React 16 (#1178)
* Allow React 16 in peerDeps and use it for dev

* Make tests pass with React 16

Changes are cosmetic:
- React 16 no longer adds a trailing `;` to `style` attributes
- React 16 outputs `0` and not `0px` for sizes in `style`
2017-10-13 15:01:18 -07:00
Ian Storm Taylor
e53cee3942 refactor decorations to use selections (#1221)
* refactor decorations to use selections

* update docs

* cleanup

* add Selection.createList

* fix tests

* fix for nested blocks

* fix lint

* actually merge

* revert small change

* add state.decorations, with search example
2017-10-13 12:04:22 -07:00
Ian Storm Taylor
b1469d62eb fix tests 2017-10-12 20:03:18 -07:00
AlbertHilb
1663e4b81c Make Void block component width 100%. (#1142)
* Make `Void` block component width `100%`.

* Update tests.
2017-09-19 08:53:07 -07:00
AlbertHilb
5c840c78e1 Reshape void component structure. (#1104)
* Reshape void component structure.
Get rid of offscreen spacer.

* Polish Embeds example `Video` component.

* Fix oversight.

* Force spacer width to be 0.

* Update tests
2017-09-12 08:51:26 -07:00
Ian Storm Taylor
ace9f47930 change slate to be a monorepo using lerna (#1106)
* init lerna, move files into ./packages

* move test files into ./packages

* more moving around

* fill out package.json files

* fixing imports

* more fixing of imports, and horribleness

* convert examples, fix linting errors

* add documentation

* update docs

* get tests passing

* update travis.yml

* update travis.yml

* update travis.yml

* update test script

* update travis.yml

* update scripts

* try simplifying travis.yml

* ocd stuff

* remove slate-core-test-helpers package

* add package readmes

* update reference docs structure

* refactor slate-simulator into its own package

* add docs for new packages

* update docs

* separate benchmarks into packages, and refactor them
2017-09-11 18:11:45 -07:00