ContentHandler
class ContentHandler(focusableTypes: Set<Int> = setOf(
StoryTypes.TITLE.type.number,
StoryTypes.TEXT.type.number,
StoryTypes.H1.type.number,
StoryTypes.H2.type.number,
StoryTypes.H3.type.number,
StoryTypes.H4.type.number,
StoryTypes.CHECK_ITEM.type.number,
StoryTypes.UNORDERED_LIST_ITEM.type.number,
), stepsNormalizer: UnitsNormalizationMap, lineBreakMap: (StoryType) -> StoryType = ::defaultLineBreakMap)
Class dedicated to handle adding, deleting or changing StorySteps
Constructors
Link copied to clipboard
constructor(focusableTypes: Set<Int> = setOf(
StoryTypes.TITLE.type.number,
StoryTypes.TEXT.type.number,
StoryTypes.H1.type.number,
StoryTypes.H2.type.number,
StoryTypes.H3.type.number,
StoryTypes.H4.type.number,
StoryTypes.CHECK_ITEM.type.number,
StoryTypes.UNORDERED_LIST_ITEM.type.number,
), stepsNormalizer: UnitsNormalizationMap, lineBreakMap: (StoryType) -> StoryType = ::defaultLineBreakMap)
Functions
Link copied to clipboard
Link copied to clipboard
fun changeStoryStepState(currentStory: Map<Int, StoryStep>, newState: StoryStep, position: Int): StoryState?
Link copied to clipboard
fun changeStoryType(currentStory: Map<Int, StoryStep>, type: StoryType, position: Int, commandInfo: CommandInfo?): StoryState
Link copied to clipboard
Link copied to clipboard
fun onLineBreak(currentStory: Map<Int, StoryStep>, lineBreakInfo: Action.LineBreak): Pair<Pair<Int, StoryStep>, StoryState>?