Giter VIP home page Giter VIP logo

nova-text's Introduction

Introduction

A simple editor but a value add feature to your next product. Stay tuned there is more to come. It is a WYSIWYG editor.

Enjoy ๐Ÿš€

View Demo

Bug Report here

NPM Package: https://www.npmjs.com/package/nova-text


Installation

To use Nova Text in your project, you can run the following command to install the nova-text:

npm i nova-text

Here is an example of how you can use it in your project.

import { useState } from 'react'
import { Editor, EditorContent } from 'nova-text/editor'

export default function App() {
  const [value, setValue] = useState<string>('')
  const onChange = (value: string) => setValue(value)

  // OR you can efficiently use it with react-hook-form with zod validation.

  return (
    <div className="p-5 space-y-5">
      <h1 className="text-3xl font-bold">Nova Text Editor Example</h1>

      <Editor
        charactersLimit={5000}
        value={value}
        onChange={onChange}
        className="
          min-h-[150px]
          rounded-md
          border
          border-input
          bg-transparent
          px-3
          py-2
          text-sm
          shadow-sm
        "
      />

      <EditorContent value={value} />
    </div>
  )
}

One of the use-cases is to use it as a textarea. The value of editor will be in HTML string, which can be used in the <EditorContent /> component.

nova-text's People

Contributors

mdtehseenkhan avatar

Watchers

 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.