Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aeaton/react-prosemirror

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aeaton/react-prosemirror - npm Package Compare versions

Comparing version 0.22.1 to 2.0.0-alpha.3

ChangeHandler.d.ts

45

package.json
{
"name": "@aeaton/react-prosemirror",
"version": "0.22.1",
"description": "A React component for ProseMirror",
"main": "dist",
"version": "2.0.0-alpha.3",
"main": "index.js",
"source": "index.ts",
"types": "index.d.ts",
"files": [
"dist",
"src"
"**/*.{js,jsx,d.ts}",
"style"
],
"publishConfig": {
"access": "public"
},
"author": "Alf Eaton <eaton.alf@gmail.com>",
"license": "MIT",
"repository": "hubgit/react-prosemirror",
"dependencies": {
"classnames": "^2.2.5",
"lodash": "^4.17.4",
"prosemirror-model": "^1.0.0",
"prosemirror-state": "^1.1.0",
"prosemirror-view": "^1.1.1"
"@aeaton/prosemirror-transformers": "^2.0.0-alpha.3"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"clean-webpack-plugin": "^0.1.17",
"css-loader": "^0.28.7",
"style-loader": "^0.20.1",
"webpack": "^3.8.1",
"webpack-node-externals": "^1.6.0"
},
"peerDependencies": {
"react": "^16.3.0",
"react-dom": "^16.3.0"
"prosemirror-model": "^1.13.1",
"prosemirror-state": "^1.3.4",
"prosemirror-view": "^1.17.3",
"react": "^17.0.1"
},
"scripts": {
"prepublishOnly": "npm run build",
"build": "webpack --progress"
}
"gitHead": "3e8f8b94fe38fdfa49aa0253111af8cdc3ad4f54"
}
## Installation
`npm install @aeaton/react-prosemirror --save`
`npm install @aeaton/react-prosemirror`

@@ -17,46 +17,18 @@ or

```js
import React from 'react'
import { HtmlEditor } from '@aeaton/react-prosemirror'
import { options } from '@aeaton/react-prosemirror-config-default'
```jsx
import { HtmlEditor, Editor, Toolbar } from '@aeaton/react-prosemirror'
import { schema, plugins, toolbar } from '@aeaton/react-prosemirror-config-default'
const CustomEditor = ({ value, onChange }) => (
export const CustomEditor = ({ value, handleChange }) => (
<HtmlEditor
options={options}
schema={schema}
plugins={plugins}
value={value}
onChange={onChange}
/>
handleChange={handleChange}
>
<Toolbar toolbar={toolbar} />
<Editor />
</HtmlEditor>
)
export default CustomEditor
```
Use a `render` prop to add the menu bar:
```js
import React from 'react'
import { HtmlEditor, MenuBar } from '@aeaton/react-prosemirror'
import { options, menu } from '@aeaton/react-prosemirror-config-default'
const CustomEditor = ({ value, onChange }) => (
<HtmlEditor
options={options}
value={value}
onChange={onChange}
render={({ editor, view }) => (
<div>
<MenuBar menu={menu} view={view} />
{editor}
</div>
)}
/>
)
export default CustomEditor
```
## Development
1. Run `lerna run build`
2. Run `lerna publish`
3. Run `lerna run deploy`

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc