forked from facebookarchive/draft-js
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving atomic blocks (facebookarchive#551)
* Implemented moveAtomicBlockBefore and moveAtomicBlockAfter in AtomicBlockUtils * Renamed EditorChangeType 'change-fragment' to 'move-block' and added to docs * Changed interface for moving atomic blocks: - Just use one function called moveAtomicBlock instead of three - Introduce DraftInsertionType for determining if a fragment shall replace another fragment, or if it shall be inserted before or after another fragment * Using ES6 variable declaration and getStart/EndKey instead of getAnchor/FocusKey
- Loading branch information
Showing
7 changed files
with
756 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* Copyright (c) 2013-present, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
* | ||
* @providesModule DraftInsertionType | ||
* @flow | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* A type that defines if an fragment shall be inserted before or after | ||
* another fragment or if the selected fragment shall be replaced | ||
*/ | ||
export type DraftInsertionType = 'replace' | 'before' | 'after'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.