Giter VIP home page Giter VIP logo

nova-tiptap's Introduction

Laravel Nova Tiptap Editor Field

A Laravel Nova implementation of the tiptap editor for Vue.js by @scrumpy.

Installation

Install via composer:

composer require manogi/nova-tiptap

Usage with default settings:

Tiptap::make('FieldName')

This will give you just the bold and italic buttons.

You will also have to add this use statement to the top of the file:

use Manogi\Tiptap\Tiptap;

Usage with your selection of buttons:

Tiptap::make('FieldName')
  ->buttons([
      'heading',
      'italic',
      'bold',
      'code',
      'link',
      'strike',
      'underline',
      'bullet_list',
      'ordered_list',
      'code_block',
      'blockquote',
  ])
  ->headingLevels(6),

When just passing the string 'heading' you will have H1, H2 and H3 to choose from. You can set the level of headings by using for example headingLevels(6) which will give you H1 through H6.

Note on the old way of setting heading levels

In older versions you could set the level of headings by using the object style notation like this: 'heading' => 6, This is still working, but is deprecated. It will be removed in the next minor version.

The two different "code" buttons

'code' is inline code (like <code></code>) while 'code_block' will give you <pre><code></code></pre>.

Screenshots

The tiptap editor with all the buttons:

the tiptap editor with all the buttons

The idea is that the editor can be themed together with the rest of Nova - here it is looking differently just by using the Laravel Nova Stripe Theme:

the tiptap editor with all the buttons

Roadmap

  • Add the option to upload or choose images and add them to to the content.
  • Easy option to style the text inside the editor.

Licence

The MIT License (MIT). Please see License File for more information.

nova-tiptap's People

Contributors

timothepearce avatar grevzi avatar zweigmbh avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.