Giter Site home page Giter Site logo

zakariarchouk / ricos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nabeelzanabeet/rich-content

0.0 0.0 0.0 270.92 MB

A super charged rich content editor with an extensible plugin system.

Home Page: https://ricos.js.org

License: MIT License

JavaScript 31.67% CSS 0.05% TypeScript 61.86% Shell 0.01% SCSS 6.05% EJS 0.03% HTML 0.33%

ricos's Introduction

A React-based, supercharged rich content editor with an extensible plugin system

lerna


Try out our demo. You can see the full documentation here: https://wix.github.io/ricos/

Quick start

Start with installing the package:

npm i ricos-editor

Then add a basic rich text editor to your app. You can now test typing and adding formatting to your text:

import { RicosEditor } from 'ricos-editor';
import 'ricos-editor/dist/styles.min.css';

<RicosEditor placeholder={'Type here!'} />;

Let's add some plugins:

npm i wix-rich-content-plugin-video wix-rich-content-plugin-divider

Adding videos and dividers:

import { RicosEditor } from 'ricos-editor';
import 'ricos-editor/dist/styles.min.css';
import 'wix-rich-content-plugin-commons/dist/styles.min.css';

import { pluginVideo } from 'wix-rich-content-plugin-video';
import 'wix-rich-content-plugin-video/dist/styles.min.css';

import { pluginDivider } from 'wix-rich-content-plugin-divider';
import 'wix-rich-content-plugin-divider/dist/styles.min.css';

<RicosEditor placeholder={'Type here!'} plugins={[pluginDivider(), pluginVideo()]} />;

There you go! A rich content editor with plugins.

See full documentation

SSR support

Compiled package also contains a CommonJS bundle, which you can consume if you are using SSR.

Using with Yoshi

To use editor with Yoshi, follow the same bootstrapping process, but make sure to include the package .css files from the .global.scss file. For example, create a file named rich-content.global.scss with the following content (make sure to import styles from any plugins you are using as well):

@import '~wix-rich-content-editor-common/dist/styles.min.css';
@import '~wix-rich-content-editor/dist/styles.min.css';

This workaround is required because Yoshi re-compiles CSS files and applies css-modules again.

Development

Prerequisites

  • protoc - install protoc on your local machine

Run Locally

  1. yarn - installs all dependencies and links any cross-dependencies.
  2. yarn build - Build the modules
  3. Run yarn exampleApp or yarn storybook to start the magic

Examples

See rich-content-editor-example to see how to consume the Component as:

Modules

Contributing

Want to help or just have ideas on how to improve Ricos? Open an issue or suggest a pull request.

License

MIT License

ricos's People

Contributors

alandardic avatar artur-charcenko avatar audriusk-wix avatar barackos avatar barboaron avatar bchmn avatar danarish4 avatar dependabot[bot] avatar dotansimha avatar ferasamasood avatar guysopher avatar lukermelesh avatar lxgreen avatar maimonav avatar mbutsykin avatar mharsat avatar michael-wix-zz avatar muteor avatar noamtwix avatar noanativ avatar nzanabeet avatar oded-soffrin avatar ronnyelkayam avatar sarunas avatar shamaysapir avatar shaulgo avatar talevy17 avatar tamrat-bay avatar vybu avatar wix-babel-ng 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.