On thing that was cool in the way that react-transcript-editor was going the alignment is that you could drop in any test via copy paste and it would try it's best to align it and restore the time-codes.
As you can see here on paste, the time-codes are self updating, coz alignment is triggered on change.
Slate doos it's alignment slightly differently. So you can't achieve the same result
paste your selection from the text file into the editor
See error
see gif below
Expected behavior
I'd expect slate-transcript-editor to behave the same as react-transcript-editor in this instance.
Additional context
react-transcript-editor uses UpdateTimestamps which converts the slate value content into plain text and uses stt-align-node to re-align it with the dpe transcript from props. It then uses the info from slate paragraphs to add the aligned words back to the paragraphs.
That modules it's heavily dependent on the draftJs data structure, it needs to be converted to handle the slateJs one.
Describe the bug
On thing that was cool in the way that react-transcript-editor was going the alignment is that you could drop in any test via copy paste and it would try it's best to align it and restore the time-codes.
As you can see here on paste, the time-codes are self updating, coz alignment is triggered on change.
Slate doos it's alignment slightly differently. So you can't achieve the same result
To Reproduce Steps to reproduce the behavior:
see gif below
Expected behavior
I'd expect slate-transcript-editor to behave the same as react-transcript-editor in this instance.
Additional context
react-transcript-editor
usesUpdateTimestamps
which converts the slate value content into plain text and uses stt-align-node to re-align it with the dpe transcript from props. It then uses the info from slate paragraphs to add the aligned words back to the paragraphs.That modules it's heavily dependent on the draftJs data structure, it needs to be converted to handle the slateJs one.
on the other hand
slate-transcript-editor
uses align-diarized-text which as stt-align-node as one of it's dependencies.