tiptap/docs/api/utilities/tiptap-php.md
2022-01-27 23:04:05 +01:00

1.1 KiB
Raw Blame History

Tiptap for PHP

Latest Version on Packagist Total Downloads

Introduction

A PHP package to work with Tiptap content. You can transform Tiptap-compatible JSON to HTML, and the other way around, sanitize your content, or just modify it.

Installation

You can install the package via composer:

composer require ueberdosis/tiptap-php

Usage

The PHP package mimics large parts of the JavaScript package. If you know your way around Tiptap, the PHP syntax will feel familiar to you. Here is an easy example:

(new Tiptap\Editor)
    ->setContent('<p>Example Text</p>')
    ->getDocument();

// Returns:
// ['type' => 'doc', 'content' => …]

Documentation

Theres a lot more the PHP package can do. Check out the repository on GitHub.