Socket
Socket
Sign inDemoInstall

draft-js-extended-utils

Package Overview
Dependencies
23
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    draft-js-extended-utils

draft-js-extended-utils utils


Version published
Maintainers
1
Install size
4.40 MB
Created

Readme

Source

Build Status

draft-js-extended-utils

Table of Contents

Installation

  npm i draft-js-extended-utils --save

Usage

import utils from 'draft-js-extended-utils';

API

contentBlock

  • getBlockByIndex
  • getSelectedBlocks
  • getSelectedBlockKeys
  • getBlockByKey
  • getFirstBlock
  • getLastBlock
  • getBlockLength
  • addBlockAfterKey
  • addBlockBeforeKey
  • removeBlockWithKey
  • changeSelectionBlockDepth
  • increaseBlockDepth
  • decreaseBlockDepth
  • setSelectedBlockData
  • mergeSelectedBlockData
  • changeBlockType
  • removeSelectedBlocks
  • splitBlock
  • getBlockDataProp
  • getRangesForInlineStyle
  • getBlockEntityRanges
  • removeEmptyBlocks
  • getStyleRanges
  • getStyleRangesWhere
  • getEntityRanges
  • getEntityRangesWhere

selection

  • selectionHasStyles
  • selectionHasEntityType
  • collapsedOnEndOffset
  • collapsedOnStartOffset
  • selectAllBlocks
  • selectFirstEntityOfTypeInRange
  • findFirstEntityOfTypeInRange
  • selectFirstOverlappingEntitiesOfTypeInRange
  • mergeSelection
  • getSelection

entity

  • createEntity
  • getEntityKeyData
  • entityKeyType
  • getEntityKeyRange
  • removeEntity
  • mergeEntityData
  • removeEntityOfType
  • firstEntityOfTypeInRange
  • selectionHasEntityType
editorState
  • setUndo
  • getUndoStack
  • getRedoStack

contentState

  • getBlockMap
  • getSelectionBefore
  • getSelectionAfter

character

  • mapSelectedCharacters
data
  • toRaw
  • toRawString
  • fromRaw
  • logRaw

Support

Please open an issue for support.

Contributing

Feel free to fork this project, make changes and submit pull requests.

Keywords

FAQs

Last updated on 19 Nov 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc