Giter VIP home page Giter VIP logo

helpjuice-wysiwyg-nextjs's Introduction

Getting Started

A simple app with a few wysiwyg functionalities that lets users to write in a text editor, an attempt to mimic text editors.

There is a text input area where users can type their text. Initially it has empty content and has a default styling. When the user starts writing on it the app starts to save each input change on a local state and conditionally saves the input value.

  • Making a heading tag

    Users can make a heading tag by typying /1 at the beginning. Then a modal pops up to let the user pick options like Heading 1 and Extended Heading 1. The style will automatically change to predefined heading1 style and the input area placholder reads Heading 1. Then when the user starts wriiting the style is in Heading 1. It is also possible to continue wriiting after the /1 tag which ignores the popup modal and changes the styling to Heading 1. The Heading 1 tag also has appropriate marginBottom value to give a sufficient space after a Heading before a paragraph starts.

  • When the user wants to end the current block just pressing Enter key will end the block and saves it to a local state. Each block is saved in a local array of block objects.

  • The default text has a predefined p style which represents a noremal paragraph text style.

Live Demo Link

Screenshot

Prerequisites

  • Node.JS
  • Next.JS

SetUp

  • Clone the repository git clone https://github.com/henatan99/helpjuice-wysiwyg-nextjs.git

  • cd to the project directory cd helpjuice-wysiwyg

  • Install dependancies npm install or yarn

  • And follow the App Usage instructions in the next section

Launch App in development server

  • npm run dev

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

Run unit tets locally with jest

  • npm run test

Usage

Either run the app in local server after setting it up or just go to the live demo and give it a try.

GIF

Authors

๐Ÿ‘ค Henok Mossissa

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!

Show your support

Give a โญ๏ธ if you like this project!

Acknowledgment

  • HekpJuice for the intersting challenge and cool Figma design references

๐Ÿ“ License

This project is MIT licensed.

helpjuice-wysiwyg-nextjs's People

Contributors

henatan99 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.