JSPDF: Difference between revisions

Find traditional instrumental music
No edit summary
No edit summary
Line 3: Line 3:
<head>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta content="authenticity_token" name="csrf-param" />
<meta content="zXRQIzyOOlzkkK66sRHXKVATzANpAXuFM2Sq3i5AY9A=" name="csrf-token" />
<title>abcjs: Tune Editor demo</title>
<script type="text/javascript" charset="utf-8" src="/w/JavaScript/resources/yui-min.js"></script>
<link href="/w/JavaScript/resources/util.css" media="all" rel="stylesheet" type="text/css" />
<script src="/w/JavaScript/resources/util.js" type="text/javascript"></script>
<script src="/w/JavaScript/resources/abcjs_editor_latest-min.js" type="text/javascript"></script>
<script src="/w/JavaScript/pdfmake.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.4/jspdf.debug.js"></script>
<script src="/w/JavaScript/vfs_fonts.js" type="text/javascript"></script>
<script type="text/javascript">
<script type="text/javascript">


Line 23: Line 13:
                                               indicate_change: true  
                                               indicate_change: true  
            });
            });
                window.ABCJS.midi.soundfontUrl = "/w/soundfonts/";
                //window.ABCJS.renderMidi("midi", abc_editor.editarea.getString(), 0), {}, { generateInline: true }, {});
//new ABCJS.Editor("abc", {generate_midi: true, generate_warnings: false});
               
}
}
</script>
</script>
Line 45: Line 30:


<div class="output">
<div class="output">
<a class="pause" href="#pause" onclick="pauseDrawing(this); return false;" title="Pause/Resume real-time drawing"></a>
<!--<a class="pdf" href="#" onclick="createPdf2('/w/htmlets/TEMP.pdf', abc_editor.editarea.getString(), 0); return false;" title="Quick PDF"></a> -->
        <a class="pdf" href="#" onclick="pdfMake.createPdf(abc_editor.editarea.getString()).open();" title="Quick PDF"></a>
<a class="yes_midi" href="#midi" onclick="pauseMidi(this); return false;" title="Pause/Resume MIDI generation"></a>
<div id="warnings"></div>
<div id="warnings"></div>
<div class="clear_both"><br /></div>
<div class="clear_both"><br /></div>

Revision as of 13:45, 19 May 2017

<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <script type="text/javascript">

window.onload = function() { abc_editor = new window.ABCJS.Editor("abc", {

                                              paper_id: "paper0",

midi_id: "midi", warnings_id: "warnings",

                                              onchange: editorChanged, 
                                              indicate_change: true 

}); } </script>

</head> <body> <p>Type or paste an abc tune in the area below and see it rendered as you type. Also notice that you can click on the drawn notes and see the place in the text where that note is defined.</p> <textarea name="ABCSandbox" id="abc" cols="80" rows="15"> X:0 T: No Score C: The Traditional Tune Archive M: K: x </textarea>

<div class="output"> <div id="warnings"></div> <div class="clear_both"><br /></div> <div id="paper0" class="paper"></div> <div id="paper1" class="paper"></div> <div id="paper2" class="paper"></div> <div id="paper3" class="paper"></div> </div>


<p>Based on abcjs. For more information, see <a href="http://abcjs.net" >the project page</a>. </p>

<p>Author: <a href=" mailto:paul@paulrosen.net ">Paul Rosen</a></p> </body> </html>