Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onEditorChange() {
const song = this.parseChordProSheet();
if (this.textPreviewer) {
this.textPreviewer.value = new ChordSheetJS.TextFormatter().format(song);
}
if (this.htmlPreviewer) {
this.htmlPreviewer.innerHTML = new ChordSheetJS.HtmlFormatter().format(song);
}
}
const ChordSheetTextViewer = (props) => {
const { song } = props;
const textChordSheet = new ChordSheetJS.TextFormatter().format(song);
return <textarea value="{textChordSheet}" readonly="">;
};
</textarea>
function switchToChordSheet() {
let song = new ChordSheetJS.ChordProParser().parse(content)
let plainText = new ChordSheetJS.TextFormatter().format(song)
setContent(plainText)
setMode('CHORD_SHEET')
}