Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Add contentState argument to decorator #601

Closed
wants to merge 1 commit into from

Conversation

mizchi
Copy link

@mizchi mizchi commented Aug 15, 2016

This is a proposal and document and test are imperfect yet.

Summary

Add contentState to decorator callback.

Example

    strategy(contentBlock, callback, newContent) {
       // ... use newContent to decide what contentBlock is
    }

** Reason **

I need to know whole newState in decorator to decide itself but has no clue now.

Example

--- start-block
yey, here is block what i want to decorate
--- end-block

These are 3 block but middle one need to know upper and below lines.

My personal trigger is here http://stackoverflow.com/questions/38893815/how-do-i-make-multiline-hilighter-on-draft-js

... but I don't know this is correct way. Anyone has better way? or need this?

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@ghost ghost added the CLA Signed label Aug 15, 2016
@ghost
Copy link

ghost commented Aug 15, 2016

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@hellendag
Copy link

I believe this should be resolved by #376.

@hellendag hellendag closed this Sep 14, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants