Fix slate minor issues: spelling in function name, Mark instead of MarkJSON in LeafJSON (#30540)

* Fix function name getMarksBetweenOffset -> getMarksBetweenOffsets

Link to the source https://github.com/ianstormtaylor/slate/blob/a09c3c2fdfe87605988a13e968643f81b4936978/packages/slate/src/models/text.js#L348-L376

* LeafJSON should use MarkJSON instead of Mark
This commit is contained in:
Daniil Samoylov
2018-11-18 09:29:04 -08:00
committed by Pranav Senthilnathan
parent b17d341688
commit dbdb44f48a
2 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -327,7 +327,7 @@ export class Text extends Immutable.Record({}) {
getFirstText(): Text;
getLastText(): Text;
getText(): string;
getMarksBetweenOffset(
getMarksBetweenOffsets(
startOffset: number,
endOffset: number
): Immutable.Set<Mark>;
@@ -362,7 +362,7 @@ export interface LeafProperties {
}
export interface LeafJSON {
marks?: Mark[];
marks?: MarkJSON[];
text?: string;
}
+4 -1
View File
@@ -13,7 +13,10 @@ const node: BlockJSON = {
leaves: [
{
text: "example",
marks: []
marks: [{
data: { testData: "data"},
type: "mark"
}]
}
]
}