Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@editorjs/dom

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@editorjs/dom

Utils useful for work with dom for Editor.js tools development

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@editorjs/dom

Utils useful for work with dom for Editor.js tools development

Installation

  npm install @editorjs/dom

Function list

  • allInputsSelector - Returns CSS selector for all text inputs
  • append - Append one or several elements to the parent
  • blockElements - Return array of names of block html elements
  • calculateBaseline - Calculates the Y coordinate of the text baseline from the top of the element's margin box,
  • canSetCaret - Checks if we can set caret
  • containsOnlyInlineElements - Check if passed content includes only inline elements
  • findAllInputs - Find all contenteditable, textarea and editable input elements passed holder contains
  • fragmentToString - Returns the HTML content of passed Document Fragment
  • getContentLength - Return length of node`s text content
  • getDeepestBlockElements - Find and return all block elements in the passed parent (including subtree)
  • getDeepestNode - Search for deepest node which is Leaf.
  • isCollapsedWhitespaces - Determine whether a passed text content is a collapsed whitespace.
  • isContentEditable - Check if passed element is contenteditable
  • isElement - Check if object is DOM node
  • isEmpty - breadth-first search (BFS)
  • isFragment - Check if object is DocumentFragment node
  • isHTMLString - Check if string contains html elements
  • isLeaf - checks node if it is doesn't have any child nodes
  • isLineBreakTag - Check if element is BR or WBR
  • isNativeInput - Checks target if it is native input
  • isNodeEmpty - Checks node if it is empty
  • isSingleTag - Check if passed tag has no closed tag
  • make - Helper for making Elements with class name and attributes
  • offset - Return element's offset related to the document
  • prepend - Append element or a couple to the beginning of the parent elements

About CodeX

CodeX is a team of digital specialists around the world interested in building high-quality open source products on a global market. We are open for young people who want to constantly improve their skills and grow professionally with experiments in cutting-edge technologies.

🌐Join 👋TwitterInstagram
codex.socodex.so/join@codex_team@codex_team

FAQs

Package last updated on 06 Nov 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc