How to use the chordsheetjs.TextFormatter function in chordsheetjs

To help you get started, we’ve selected a few chordsheetjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github martijnversluis / ChordFiddle / js / chord_pro_editor.js View on Github external
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);
    }
  }
github martijnversluis / ChordFiddle / src / components / ChordSheetTextViewer.jsx View on Github external
const ChordSheetTextViewer = (props) => {
  const { song } = props;
  const textChordSheet = new ChordSheetJS.TextFormatter().format(song);

  return <textarea value="{textChordSheet}" readonly="">;
};
</textarea>
github artutra / OpenChord / app / containers / SongEdit.tsx View on Github external
function switchToChordSheet() {
    let song = new ChordSheetJS.ChordProParser().parse(content)
    let plainText = new ChordSheetJS.TextFormatter().format(song)
    setContent(plainText)
    setMode('CHORD_SHEET')
  }

chordsheetjs

A JavaScript library for parsing and formatting chord sheets

GPL-2.0
Latest version published 2 months ago

Package Health Score

78 / 100
Full package analysis