This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@prezly/slate-hyperscript
TypeScript icon, indicating that this package has built-in type declarations

0.32.0 • Public • Published

@prezly/slate-hyperscript

Hyperscript helpers for creating Slate documents with JSX.

Version License

Description

This is a copy of slate-hyperscript package into our code (v0.58.0).

The only changes done to this code are:

  • formatting this code with prettier
  • adding /* eslint-disable */ comments at the top of these files so that ESLint does not complain
  • prefixing unused function arguments with _ to avoid TS6133

Why

We need createText function in our code and slate-hyperscript package does not export it.

Why do we need createText function in our code

Slate uses createText function for handling <text> elements in hyperscript. This collides with <text> elements from React TypeScript definitions. That's why we need a different tag name to represent text elements from Slate. We chose h-text for that tag name (and actually apply h- prefix for all other custom tag names). But to make it work we need createText function.

See src/createHyperscript.ts to see how it's composed.


Brought to you by Prezly.

Readme

Keywords

none

Package Sidebar

Install

npm i @prezly/slate-hyperscript

Weekly Downloads

7

Version

0.32.0

License

MIT

Unpacked Size

52.7 kB

Total Files

27

Last publish

Collaborators

  • mohammadxali
  • francis-prezly
  • pestaa
  • kudlik
  • digitalbase
  • e1npm
  • satoav
  • makanda