GithubHelp home page GithubHelp logo

wix / ricos Goto Github PK

View Code? Open in Web Editor NEW
276.0 276.0 41.0 412.73 MB

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

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

License: MIT License

JavaScript 13.53% CSS 0.05% TypeScript 79.79% Shell 0.01% SCSS 6.24% EJS 0.03% HTML 0.36%
prose-mirror react rich-content-editor

ricos's People

Contributors

alandardic avatar artur-charcenko avatar audriusk-wix avatar barackos avatar barboaron avatar bchmn avatar danarish4 avatar dependabot[bot] avatar domakas avatar dotansimha avatar guyhaviv37 avatar guysopher avatar justame avatar lxgreen avatar maimonav avatar mharsat avatar michael-wix-zz avatar muteor avatar noamtwix avatar nzanabeet avatar oded-soffrin avatar ronnyelkayam avatar sarunas avatar shamaysapir avatar shaulgo avatar shlomo-gangul avatar talevy17 avatar tamrat-bay avatar vybu avatar wix-babel-ng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ricos's Issues

setState call after unmount

I see warning:

Warning: Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.

This is due to https://github.com/wix-incubator/rich-content/blob/master/packages/editor/src/RichContentEditor/Toolbars/SideToolbar/SideToolbar.jsx#L65

Probably need to track mounted status and check that inside the async call.

`pro-gallery-renderer` component includes wrong class names

IMHO there should be no _-node_modules-...

_-node_modules-pro-gallery-renderer-dist-src-components-styles-global__pro-circle-preloader__2qPIF {
  -webkit-animation: _-node_modules-pro-gallery-renderer-dist-src-components-styles-global__semi-rotate__1B3Bd 1s linear infinite;
          animation: _-node_modules-pro-gallery-renderer-dist-src-components-styles-global__semi-rotate__1B3Bd 1s linear infinite;
  height: 30px;
  left: 50%;
  margin-left: -15px;
  margin-top: -15px;
  overflow: hidden;
  position: relative;
  -webkit-transform-origin: 100% 50%;
          transform-origin: 100% 50%;
  width: 15px; }

RCV - Fails when using hashtag with onClick prop with SSR

See example on sep6-viewer-ssr branch
there are a text line and hashtag with decorator
the gallery below doesn't render due to a client-side exception: "Uncaught Error: Unable to find element with ID 29."

if we remove the 'onClick' on the hashtag, everything works

Plugin developer guidelines

Plugin Development Guidelines

Theming Guidelines [done]

Accessibility Guidelines

Plugin Project Structure

Editor APIs

Toolbars

Plugin Insertion Toolbars

Plugin Functionality Toolbar

Text Toolbar Plugin Buttons

Modals [DONE]

Common Components

Component Data Validation

Styling Strategies

Editor Decorators

Viewer APIs

Type Mappers

Viewer Decorators

Plugin Build Artifacts

Empty classes in .scss files removed from bundled css and classnames maps

If class in .scss is empty (https://github.com/wix-incubator/rich-content/blob/develop/packages/common/statics/styles/tooltip.scss), after build its removed from bundled css and classnames maps. Because of that you can't customize component's classNames via themes, like https://github.com/wix-incubator/rich-content/blob/develop/packages/common/src/Components/TooltipHost.jsx.

https://github.com/wix-incubator/rich-content/blob/develop/packages/common/src/Components/TooltipHost.jsx#L9 at bundled .js styles is empty, and mergeStyles do nothings, since it operates with keys from styles, and classNames from theme not merged into result object.

RCV fails to render basic styles

When same theme is provided to both RCE and RCV the rendered output is different. Emitted HTML from RCV does not have required elements so CSS rules are not applied.

rce_vs_rcv

Viewer fails to render white-spaces

rce_vs_rcv_spaces

    "blocks": [{
            "key": "foo",
            "text": " (\\n)\nnewline before and after (\\n) \n",
            "type": "unstyled",
            "depth": 0,
            "inlineStyleRanges": [],
            "entityRanges": [],
            "data": {}
        },
        {
            "key": "hu3e",
            "text": "newline after (\\n) followed by empty block\n ",
            "type": "unstyled",
            "depth": 0,
            "inlineStyleRanges": [],
            "entityRanges": [],
            "data": {}
        },
        {
            "key": "hu5g",
            "text": "",
            "type": "unstyled",
            "depth": 0,
            "inlineStyleRanges": [],
            "entityRanges": [],
            "data": {}
        },
        {
            "key": "97j3p",
            "text": "newline after (\\n) \n ",
            "type": "unstyled",
            "depth": 0,
            "inlineStyleRanges": [],
            "entityRanges": [],
            "data": {}
        },
        {
            "key": "159g0",
            "text": "No spaces",
            "type": "unstyled",
            "depth": 0,
            "inlineStyleRanges": [],
            "entityRanges": [],
            "data": {}
          },
          {
            "key": "endmd",
            "text": "    4 spaces",
            "type": "unstyled",
            "depth": 0,
            "inlineStyleRanges": [],
            "entityRanges": [],
            "data": {}
          },
          {
            "key": "9k2u9",
            "text": "        8 spaces",
            "type": "unstyled",
            "depth": 0,
            "inlineStyleRanges": [],
            "entityRanges": [],
            "data": {}
          }
    ],
    "entityMap": {
    }
}

Entity toolbar positioning

The feature we want to achieve is that when a user focuses on an item the toolbars are never hidden off screen.

We thought of a couple of ways to handle this:

  • Scroll the screen to the toolbar when the toolbar is off screen
  • Have the toolbar appear below or above depending on scroll position, though this doesn't help much on mobile with large images that fill the screen.

Main challenge is knowing when the toolbar is off screen, as RCE doesn't know the full context in which its used, like being inside a overflow: scroll etc.

Customise toolbar container

We would like a way to customise the toolbar container, our use case is that we would like to add a "chevron" to the box.

image

image

Custom link dialog

We would like to achieve something close to this:

image

Not sure if we can control toolbar visibility like that very easily, but being able to pass in some sort of custom dialog component would help.

Soft new line should work on Firefox

Currently, if a symbol is being typed after soft new line [Shift + Enter], it appended to a previous line before the soft new line (reproduced on latest Firefox)

Advice needed regarding development

Please advice:

  1. I need to make text toolbar visible all the time (currently it doesn’t show up)
  2. I need to add extra buttons to text toolbar (font size, font family, colors, line height, …)
  3. I need to create a layout plugin, which would allow to split the content into columns

seems the only way to achieve this is to contribute to main project.
i cannot make poc/tests in my own project

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.