This repository has been archived by the owner on May 19, 2020. It is now read-only.
Handle Duplicate clauseId from Copy/Paste #134
Labels
Difficulty: Challenging
Hacktoberfest
by DigitalOcean and DEV
Type: Feature Request 🛍️
New feature or request
Milestone
Linked Isues:
- MDE 88
- TSv2 82
Is your feature request related to a problem? Please describe.
Incorporate any
clause
specific logic here frommarkdown-editor
Issue 88Currently, a
uuidv4
is assigned to each clause template added into the markdown of the contract. Copying and pasting should recognize that as already existing and create a newuuidv4
Describe the solution you'd like
Possibly register multiple
onPaste
handlers on the underlying Slate editor. These are likely chained by the call tonext()
. Test what happens on paste ofHTML
which contains an existingclause
<div>
.When a clause template is pasted, TSv2 should check to see if a clause template exists in the pasted text. If so, check if that clause template is already in the contract. If so, assign a new
uuidv4
to this clause template.Describe alternatives you've considered
A good starting point should be
SlateJS
'sonPaste
pluginAlready in the code here
Additional context
N/A
The text was updated successfully, but these errors were encountered: