@springmicro/page
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

@springmicro/page

Webpage Editor with Slate and other widgets.

Fork of React Page. Original repository: https://github.com/react-page/react-page. The commit that was accessed was https://github.com/react-page/react-page/tree/2463f837858716626ff6892328e760b7fbd14c4d.

Motivation

react-page has dependencies that are outdated; some only work with React 17 and lower. The original repository was referenced when creating this one.

Changes

  • All references to react-dnd have been commented out, but are still searchable within the repository. react-dnd v15 was the one used by react-page and was incompatible with React 18 mostly due to problems with refs. The references to react-dnd are keep in because we have plans to support drag and drop again, perhaps with @hello-pangea/dnd.
  • In the redux store, there was a __nodeCache that wasn't working so references to that have also been commented out.
  • Autoform from uniforms wasn't working, so it was replaced by rjsf. Reference file: src\editor\core\components\Cell\PluginControls\index.tsx. The old Autoform code is still here for reference.
  • Right now, everything is bundled into one package, including dependencies like react-admin. Several of those will become peer dependencies soon.

Development

  • Visit src/plugins for examples on how to implement a plugin. Plugins are types of "blocks" in the editor (i.e. slate rich text, youtube embed, etc.). Also the PluginDrawer at src\editor\ui\PluginDrawer\index.tsx is where the sidebar is when you add a new plugin. BottomToolbar (src\editor\ui\BottomToolbar\index.tsx) is where the controls are for the active plugin.

Exports

Here are the exposed components and types.

// Value is the editor state.
export type { EditorProps, Value };
// Ra* components are for react-admin. Adapted from https://www.npmjs.com/package/@react-page/react-admin.
export { Editor, RaReactPageInput, RaSelectReferenceInputField };

Readme

Keywords

none

Package Sidebar

Install

npm i @springmicro/page

Weekly Downloads

9

Version

0.2.1

License

none

Unpacked Size

6.51 MB

Total Files

77

Last publish

Collaborators

  • springmicro