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

@contentful/live-preview

Package Overview
Dependencies
Maintainers
156
Versions
218
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/live-preview

Preview SDK for both the field tagging connection + live content updates

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
52K
increased by0.22%
Maintainers
156
Weekly downloads
 
Created
Source

@contentful/live-preview

Preview SDK for both the field tagging connection + live content updates by Contentful.

It uses Typescript, React and is bundled using Vite.

Getting started

Requirements

  • Node.js: >=16.15.1
  • Yarn: >=1.21.1

To install live preview simply run one of the following commands.

yarn add @contentful/live-preview

or

npm install @contentful/live-preview

Documentation

Field Tagging

To tag fields you need to add the live preview data-attributes to the rendered HTML element output. You can do this in React via our helper function.

import { getLivePreviewProps } from '@contentful/live-preview';

...

<h1 {...getLivePreviewProps({ entryId: id, fieldId: 'title', locale })}>
  {title}
</h1>

Live Updates

[Documentation on live updates]

Code of Conduct

We want to provide a safe, inclusive, welcoming, and harassment-free space and experience for all participants, regardless of gender identity and expression, sexual orientation, disability, physical appearance, socioeconomic status, body size, ethnicity, nationality, level of experience, age, religion (or lack thereof), or other identity markers.

Read our full Code of Conduct.

License

The live preview package is open source software licensed as MIT.

FAQs

Package last updated on 28 Feb 2023

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