2.1.0 • Published 6 years ago
@specup/editor v2.1.0
XEN Editor
Xen prosemirror editor
Installation
Peer Dependencies
yarn add react styled-components bulmaUsage
import 'bulma/css/bulma.css'
import '@specup/editor/dist/style.css'
import { Editor } from '@specup/editor'
const EditorContainer = () => {
  const ref = useRef(null)
  const [html, setHTML] = useState(null)
  function handlePrintClick() {
    if (ref.current) {
      setHTML(ref.current.html())
    }
  }
  return (
    <>
      <StyledEditor
        initialValue={`
          <p style="text-align: center">Buddy</p>
          <p>Hello</p>
          <p><span style="color: red;">World</span></p>
          <p style="margin-left: 40px">Indented</p>
        `}
        apiBaseURL="https://graphql.linkareer.com/graphql"
        ref={ref}
      />
      <button onClick={handlePrintClick}>Print</button>
      {html && <div dangerouslySetInnerHTML={{ __html: html }} />}
    </>
  )
}Deploy
npm login
npm version <patch | major | minor...> && npm publishContributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
1.0.20
6 years ago
2.1.0
6 years ago
2.0.0
6 years ago
1.0.19
6 years ago
1.0.18
6 years ago
1.0.17
6 years ago
1.0.16
6 years ago
1.0.15
6 years ago
1.0.14
6 years ago
1.0.13
6 years ago
1.0.12
6 years ago
1.0.11
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago