forked from Gitlink/forgeplus-react
33 lines
941 B
Plaintext
33 lines
941 B
Plaintext
/**
|
|
* 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 RawDraftContentBlock
|
|
* @format
|
|
* @flow
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import type { DraftBlockType } from './DraftBlockType';
|
|
import type { EntityRange } from './EntityRange';
|
|
import type { InlineStyleRange } from './InlineStyleRange';
|
|
|
|
/**
|
|
* A plain object representation of a ContentBlock, with all style and entity
|
|
* attribution repackaged as range objects.
|
|
*/
|
|
export type RawDraftContentBlock = {
|
|
key: ?string;
|
|
type: DraftBlockType;
|
|
text: string;
|
|
depth: ?number;
|
|
inlineStyleRanges: ?Array<InlineStyleRange>;
|
|
entityRanges: ?Array<EntityRange>;
|
|
data?: Object;
|
|
children?: Array<RawDraftContentBlock>;
|
|
}; |