Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a paste-manager api to customize final delta. #401

Merged
merged 1 commit into from
Jun 26, 2015

Conversation

yyjhao
Copy link

@yyjhao yyjhao commented Jun 22, 2015

This will make it easier for post-processing the pasted data without having to rewrite the paste manager or wait for the text-change event.

@container = @quill.addContainer('ql-paste-manager')
@container.setAttribute('contenteditable', true)
dom(@quill.root).on('paste', _.bind(this._paste, this))
@options = _.defaults(options, { containerToDelta: this._containerToDelta })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you structure this similar to other modules where there's a DEFAULTS static: https://github.com/quilljs/quill/blob/develop/src/modules/image-tooltip.coffee#L10. Can we also name the config onConvert (that's the best I could come up with... might be a better name still but I think containerToDelta is too long and context dependent).

@yyjhao yyjhao force-pushed the paste_container_to_delta branch from d153aff to 2db704e Compare June 23, 2015 17:21
@yyjhao
Copy link
Author

yyjhao commented Jun 26, 2015

Hi I have updated the diff, can you take a look again?

jhchen added a commit that referenced this pull request Jun 26, 2015
Provide a paste-manager api to customize final delta
@jhchen jhchen merged commit 54cae74 into slab:develop Jun 26, 2015
@jhchen
Copy link
Member

jhchen commented Jun 26, 2015

Awesome thanks!

@yyjhao yyjhao deleted the paste_container_to_delta branch June 26, 2015 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants