This repository has been archived by the owner on May 19, 2020. It is now read-only.
feat(ClausePlugin): handle paste functionality with clauses - I134 #136
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #134
Create new
uuid
for a clause that was copy/pasted in conjunction with this PR inmarkdown-editor
Changes
Document
on the event and make it mutable in order to change theclauseid
to auuid
and revert everything to immutable@accordproject/markdown-editor
Flags
Further issues should consider:
Handling different
transfer.type
situationsHTML
(Chrome to VSCode to Chrome)<clause>
formatting)Ensure
onPaste
handlers are not doubling up work for anytransfer.type
cases@accordproject/cicero-ui/src/plugins/ClausePlugin
@accordproject/markdown-editor/src/SlateAsInputEditor
What
fragment.type
results when copying pasting from one editor to another instance of an editor?fragment
as atransfer.type
is a Slate DOM block fragment, notHTML
anymore, so copying and pasting from the same editor into itself should be a fragmentHTML
orfragment
, needs experimentationPreserve formatting, if
H1
inHTML
, we should be preserving the formattingHTML
tags to Slate blocks hereFurther work is needed in the redux store of TSv2, showcased here where the new
uuid
's placed onto theclauses
are not represented in the store, and moreover the extra pasted clause does not appear at all:DOM:
![Screen Shot 2019-08-30 at 3 32 49 PM](https://user-images.githubusercontent.com/36460856/64048218-1f4c8f00-cb3f-11e9-89f1-bfbc9890c66d.png)
![Screen Shot 2019-08-30 at 3 33 08 PM](https://user-images.githubusercontent.com/36460856/64048223-22e01600-cb3f-11e9-99ab-e58394194647.png)
Store:
Related Issues