ji-devs / draft-canvas

https://jewish-interactive.github.io/draft-canvas
MIT License
0 stars 0 forks source link

Save button - return canvas #16

Closed dakom closed 6 years ago

dakom commented 6 years ago

Crops canvas to content

Generates a new canvas element, cropped to content.

For examples:

It should then call a callback which was supplied via a top-level prop, with both the original targetCanvas and this newly created cropped canvas

The return here is in addition to https://github.com/jewish-interactive/draft-canvas/issues/22

jpuri commented 6 years ago

Should this canvas element be hidden or visible to the user ?

dakom commented 6 years ago

It should be invisible - purely an in-memory node

jpuri commented 6 years ago

This feature is half implemented, save button is added and it sends back the rendered Canvas node, I am still working on the invisible canvas node.

jpuri commented 6 years ago

On save it will now return an object with 2 parameters {rawDraftContentState, canvas}.