Ian Storm Taylor
f69d2c4a12
remove keyboard data.*
properties ( #1235 )
...
* update examples and walkthroughs
* deprecate data keyboard properties
* update examples
* add is-hotkey to resources doc
* udpate docs
* update docs
* fix split-block test
2017-10-15 19:23:07 -07:00
Ian Storm Taylor
6c42f6c9c3
Rename Range
to Leaf
, and Selection
to Range
( #1231 )
...
* rename Range to Leaf
* rename Selection to Range
* add findDOMRange, findNode, findRange helpers
* refactor to remove findDropPoint util
* revert findDOMNode to throwing errors
* export new helpers, fix linter
* update docs
* update examples
2017-10-14 15:36:27 -07:00
Ian Storm Taylor
a1d2223e36
add syncing-operations example
2017-10-13 16:24:00 -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
Ian Storm Taylor
9fca2d3b9b
start removing raw serializer ( #1098 )
...
* start removing raw serializer
* convert first tests to use jsx
* simplify jsx tests for raw serializer
* allow for options in raw serializer tests
* add more preserve option tests
* convert plain serializer tests
* convert html serialize
* start converting html deserialize
* add hyperscript util
* remove slate-sugar copy-pasted
* finish converting html deserialize
* convert plugins tests
* update rendering tests
* convert schemas tests
* convert core plugin tests
* update hyperscript utl
* refactor changes test directory structure
* fix changes before migration
* add migrated changes test files
* remove <x- prefixes from migration
* get addMark at-current-range tests passing
* get delete at-current-range tests passing
* remove old tests
* convert deleteForward and deleteBackward
* convert insertBlock, insertInline, insertFragment, insertText
* convert removeMark, setBlock, setInline, splitBlock, splitInline
* add unstaged tests
* convert toggleMark, unwrapBlock, unwrapInline, wrapBlock, wrapInline, wrapText
* convert call, setData
* convert on-selection tests
* remove old on-selection tests
* convert history tests
* convert insertFragmentByKey, insertNodeByKey, insertTextByKey, mergeNodeByKey, moveNodeByKey
* convert removeNodeByKey, removeTextByKey, setMarkByKey, setNodeByKey
* convert splitDescendantsByKey, splitNodeByKey, unwrapBlockByKey, unwrapInlineByKey, unwrapNodeByKey, wrapBlockByKey
* fix tests
* port missing at-range tests to at-current-range
* remove at-range tests
* fix raw serializer tests
* fix linter
* fix to prefer toJSON as the canonical method name
* fix todos
* remove internal references to Raw
* add deprecation helper to Text.fromJSON
* convert examples to not use Raw, and not rely on terse
* remove focus-blur example, rename large document example
* refactor Raw serialize to deprecate, not remove, terse
* deprecate defaultBlockType, toRaw, cleanup serializers
2017-09-10 14:56:03 -07:00
Ian Storm Taylor
e51cf5e028
cleanup many things in ./utils ( #1061 )
2017-09-06 15:27:55 -07:00
Ian Storm Taylor
7470a6dd53
Expose transforms ( #836 )
...
* refactor to extract applyOperation util
* change handlers to receive transform instead of state
* change onChange to receive a transform, update rich-text example
* fix stack iterationg, convert check-list example
* convert code-highlighting, embeds, emojis examples
* change operations to use full paths, not indexes
* switch split and join to be recursive
* fix linter
* fix onChange calls
* make all operations invertable, add src/operations/* logic
* rename "join" to "merge"
* remove .length property of nodes
* fix node.getFragmentAtRange logic
* convert remaining examples, fix existing changes
* fix .apply() calls and tests
* change setSave and setIsNative transforms
* fix insert_text operations to include marks always
* cleanup and fixes
* fix node inheritance
* fix core onCut handler
* skip constructor in node inheritance
* cleanup
* change updateDescendant to updateNode
* add and update docs
* eliminate need for .apply(), change history to mutable
* add missing file
* add deprecation support to Transform objects
* rename "transform" to "change"
* update benchmark
* add deprecation util to logger
* update transform isNative attr
* fix remaining warn use
* simplify history checkpointing logic
* fix tests
* revert history to being immutable
* fix history
* fix normalize
* fix syntax error from merge
2017-09-05 18:03:41 -07:00
Dan Burzo
786050f732
Introduces state.activeMarks and has add/remove/toggleMark use it instead of state.marks ( #990 )
...
* WIP getting raw marks arrays from the current range
* Always handle marksRaw as Array, fixes tests/lint
* Clean up
* Fixes collapsed selection raw marks, simpler _every_ condition, harmonize toolbar buttons in rich-text example
* raw -> perCharacter
* Add tests for toggleMark collapsed selection
* Add .DS_Store to .gitignore
* Added test for toggleMark add in partially marked selection, with and without other marks
* Added docs for state.marksPerCharacter
* replace marksPerCharacter with activeMarks
* Update the other examples
* Clarify getActiveMarksAtRange
* AddMark/RemoveMark to use getActiveMarksByRange
* User activeMarks for toggle§MarkAtRange transform
2017-09-05 17:48:19 -07:00
Hans-Wilhelm Warlo
469d8b394c
Refactor render arrow functions ( #969 )
2017-08-02 09:36:33 -07:00
Ian Storm Taylor
c3578d12ad
tighten linting rules
2017-02-25 10:13:21 -08:00
Ian Storm Taylor
d281140619
remove isRendering flag lock, closes #383
2016-11-18 13:33:12 -08:00
Ian Storm Taylor
6f67ac70c9
fix linting
2016-11-17 18:10:30 -08:00
Ian Storm Taylor
508d2b15b7
fix deprecate node access without key
2016-11-17 12:34:10 -08:00
Soreine
944adc27fe
Remove needless transform = transform.method()
2016-11-10 15:18:52 +01:00
Soreine
a319499f7c
Enforce 2-spaces indentation
2016-11-10 11:04:49 +01:00
Soreine
ce0a5579e7
Remove a most of unused vars
2016-10-25 13:12:10 +02:00
Ian Storm Taylor
ccac6102a5
fixes
2016-08-14 13:21:46 -07:00
Ian Storm Taylor
722bf0cf83
add rendering of marks from schema
2016-08-13 17:11:22 -07:00
Ian Storm Taylor
eeb97c0611
add rendering of components from schema
2016-08-13 16:48:21 -07:00
Ian Storm Taylor
5e9f19db92
remove extra style prop from editor example
2016-08-01 13:48:23 -07:00
Ian Storm Taylor
560b28ce32
add debug points, remove unused deps, fix composition
2016-08-01 13:45:46 -07:00
Ian Storm Taylor
17d676b639
refactor rtl support, add rtl example
2016-07-29 12:05:01 -07:00
Samy Pessé
845e284ee4
Add RTL support ( #204 )
...
* Add property textAlignment for the whole editor
* textAlignment should be set on Content
* Add basic for directionMap in State
* Add RTL to example
* Use setDocument for updating direction map when inserting blocks
* Remove debug log
* Only add 'dir' to node when is not default value
* Prevent tests from failing because of .DS_Store on OSX
* Add tests for rtl rendering
* Fix rendering tests
* Fix test for rendering "text-direction"
* Remove textAlignment prop on editor
* Don't use a directionMap but directly a "textDir" on nodes
* Remove .setDocument from State
2016-07-29 11:25:07 -07:00
Ian Storm Taylor
d20b8511bb
refactor onKeyDown to use data object
2016-07-27 16:22:11 -07:00
Ian Storm Taylor
d78ddeabad
update examples for terse raw
2016-07-25 14:45:37 -07:00
Ian Storm Taylor
0ebe5b4b64
add toggleMark and toggleMarkAtRange transforms
2016-07-21 11:59:21 -07:00
Ian Storm Taylor
f1b961fc35
add memoization and clean up node methods ( #141 )
...
* cleanup node methods
* add first stab at memoization of node methods
* rename getTextNodes() to getTexts() for consistency
2016-07-20 21:36:52 -07:00
Ian Storm Taylor
8654dfc929
fix rich text example
2016-07-20 14:59:10 -07:00
Ian Storm Taylor
9499b9188b
change unwrapBlock to operate only on the siblings in a range
2016-07-20 14:13:29 -07:00
Ian Storm Taylor
a9314f58a9
add default should component update ( #124 )
...
* add development performance testing examples
* refactor node map methods to be optimized
* fix updateDescendants return value
* remove console logs
* remove extra console log
2016-07-18 15:30:46 -07:00
Somasundaram Ayyappan
0289edfc29
Rename mark/unmark transforms to addMark/removeMark ( #113 )
...
* Rename mark/unmark transforms to addMark/removeMark
* delete gitkeep
2016-07-18 12:00:30 -07:00
Ian Storm Taylor
c0c1133236
fix rich-text example lists
2016-07-15 16:08:13 -07:00
Julian Krispel-Samsel
9c020d9a04
Typos ( #95 )
2016-07-15 16:02:03 -07:00
Ian Storm Taylor
d8783d618a
add more example readmes
2016-07-14 16:31:55 -07:00
Jared Palmer
877e2c1118
remove dangling comma that invalidated json
...
removes a dangling comma in rich-text example's state.json.
2016-07-13 20:09:54 -04:00
Ian Storm Taylor
ab12518a4b
clean up examples
2016-07-13 16:19:49 -07:00
Ian Storm Taylor
c218c1721e
cleanup the rich text example
2016-07-13 15:12:47 -07:00
Ian Storm Taylor
3d33ab3da2
add plain text serializer
2016-07-13 14:55:41 -07:00
Ian Storm Taylor
3d191dbf14
add placeholder
2016-07-11 18:36:45 -07:00
Ian Storm Taylor
9b3bcd837d
fix firefox support
2016-07-07 19:37:34 -07:00
Ian Storm Taylor
db1151bd15
add linting to examples
2016-07-07 08:35:13 -07:00
Ian Storm Taylor
de4afd38b1
cleanup renderers in examples, fixes #43
2016-07-06 14:42:59 -07:00
Ian Storm Taylor
e9ed40dd7f
remove default export, fixes #42
2016-07-06 14:21:11 -07:00
Ian Storm Taylor
85361bf749
add hovering menu example
2016-06-28 15:47:29 -07:00
Ian Storm Taylor
2743c3741d
refactor examples
2016-06-24 10:22:48 -07:00
Ian Storm Taylor
69d2a55d33
fix examples
2016-06-23 23:59:22 -07:00
Ian Storm Taylor
38b85fe720
fix bugs in rich text example
2016-06-21 17:08:15 -07:00
Ian Storm Taylor
c3257a37d4
distinguish between block and inline nodes
2016-06-21 16:44:11 -07:00
Ian Storm Taylor
dbdf3760e9
refactor examples, normalize selections
2016-06-21 14:49:08 -07:00
Ian Storm Taylor
7fa78870c3
fix auto-markdown example
2016-06-21 10:43:04 -07:00