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

slate-hyperscript

Package Overview
Dependencies
Maintainers
5
Versions
393
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slate-hyperscript

A hyperscript helper for creating Slate documents.

  • 0.67.0-2021102385317
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
384K
decreased by-3.95%
Maintainers
5
Weekly downloads
 
Created

What is slate-hyperscript?

The slate-hyperscript package is a utility for creating Slate.js editor content using a hyperscript syntax. It allows developers to define the structure of their editor content in a more readable and declarative way.

What are slate-hyperscript's main functionalities?

Creating Elements

This feature allows you to create elements in the Slate editor using JSX-like syntax. The example demonstrates how to create a paragraph element with some text.

<jsx>
  <element type="paragraph">
    <text>Some text in a paragraph.</text>
  </element>
</jsx>

Creating Text Nodes

This feature allows you to create text nodes with specific properties. The example shows how to create a text node with bold formatting.

<jsx>
  <text bold={true}>Bold text</text>
</jsx>

Creating Nested Structures

This feature allows you to create nested structures within the editor content. The example demonstrates how to create a paragraph containing a link element.

<jsx>
  <element type="paragraph">
    <text>Some text in a paragraph with a </text>
    <element type="link" url="https://example.com">
      <text>link</text>
    </element>
    <text>.</text>
  </element>
</jsx>

Other packages similar to slate-hyperscript

Keywords

FAQs

Package last updated on 23 Nov 2021

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