ve-editor

ve-editor React component

Usage no npm install needed!

<script type="module">
  import veEditor from 'https://cdn.skypack.dev/ve-editor';
</script>

README

ve-editor

Travis npm package Coveralls

This repo contains a react VectorEditor component + redux hook-ins for that component. Also available for use are subcomponents:

CircularView
LinearView
RowView
RowItem
StatusBar
VeToolBar

Use this package like:

//rootReducer.js
import {reducer as VectorEditor} from 've-editor';

var initialState = {VectorEditor: {
  YourNamedEditor: {},
}}
return combineReducers({
    VectorEditor, //plug in the VectorEditor reducer
    ...etc.
})

//YourNamedEditor.js
import createVectorEditor from 've-editor'
export default createVectorEditor({
  namespace: 'YourNamedEditor', 
})


//a-file-that-uses-the-editor.js
import YourNamedEditor from '../YourNamedEditor';
var {VectorEditor, VectorEditorContainer, veSelectors, veActions} = YourNamedEditor

render() {
    return (
    <div>
        <VectorEditor {...{actionOverrides}}>
          <CircularView
            {
              ...{
                ...editorDimensions,
              }
            }
            />
        </VectorEditor>
    </div>
    )
}