Replies: 1 comment 2 replies
-
Hi @img-play {this.state.transcriptJson !== null && (
<TranscriptEditor
transcriptData={this.state.transcriptJson} // Transcript json
mediaUrl={this.state.url} // string url to media file - audio or video
// showTitle={true}
isEditable={true} // se to true if you want to be able to edit the text
title={this.state.transcriptTitle}
mediaType={mediaType}
autoSaveContentType={'digitalpaperedit'}
handleSaveEditor={this.handleSave}
// handleAutoSaveChanges={ this.handleSave }
/>
)} You can also see it in context here pietrop/digital-paper-edit-client/src/Components/Transcripts/TranscriptCorrect.js#L153 Ps: I am converting this issue to a discussion. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am wondering if you might be able to point me in the right direction. I am able to get the editor running in a React app (create-react-app) with a static JSON transcript:
But I am struggling to make the editor accept an object which is not fetched using an import statement. The following function returns the exact same JSON object as
test.json
:When I replace
import TRANSCRIPT_DATA from './test';
withconst TRANSCRIPT_DATA = loadTranscriptData();
(and of course import the file where the function lives), the editor still loads but does not display the contents of the transcript, only some generic strings.So I'm asking this in case I am missing something obvious or in case you're supposed to load dynamic JSON into the editor using a different method. Any little pointer is highly appreciated.
Best,
David Trasbo
Beta Was this translation helpful? Give feedback.
All reactions