How to use the chordsheetjs.Song 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 / src / components / ChordSheetTextViewer.jsx View on Github external
import React from 'react';
import ChordSheetJS from 'chordsheetjs';
import PropTypes from 'prop-types';

import '../css/ChordSheetTextViewer.css';

const ChordSheetTextViewer = (props) => {
  const { song } = props;
  const textChordSheet = new ChordSheetJS.TextFormatter().format(song);

  return <textarea value="{textChordSheet}" readonly="">;
};

ChordSheetTextViewer.propTypes = {
  song: PropTypes.instanceOf(ChordSheetJS.Song).isRequired,
};

export default ChordSheetTextViewer;
</textarea>
github martijnversluis / ChordFiddle / src / components / ChordSheetHTMLViewer.jsx View on Github external
import ChordSheetJS from 'chordsheetjs';
import PropTypes from 'prop-types';

import '../css/ChordSheetHTMLViewer.css';

const ChordSheetHTMLViewer = (props) =&gt; {
  const { song } = props;
  const htmlChordSheet = new ChordSheetJS.HtmlTableFormatter().format(song);

  return (
    <div>
  );
};

ChordSheetHTMLViewer.propTypes = {
  song: PropTypes.instanceOf(ChordSheetJS.Song).isRequired,
};

export default ChordSheetHTMLViewer;
</div>

chordsheetjs

A JavaScript library for parsing and formatting chord sheets

GPL-2.0
Latest version published 3 days ago

Package Health Score

78 / 100
Full package analysis

Similar packages