ficdown.js/src/tests.html

53 lines
1 KiB
HTML
Raw Normal View History

2014-07-01 18:59:41 -05:00
<!DOCTYPE html>
<html lang="en">
<head>
<title>Ficdown.js Tests</title>
<meta charset="utf-8">
</head>
<body>
<div>
<textarea style="height:200px;width:600px;" id="input"># [Test Story](/test-scene)
This is a test story by Rudis Muiznieks
Version 1
## Test Scene
This is a test scene.scene
- [This is an option.](/test-scene-2)
- [This is another option.](#test-condition)
- [Another scene.](/test-scene-3)
2014-07-01 18:59:41 -05:00
### Test Condition
You have [|not](?test-condition) selected that option before.
## [Test Scene](?test-condition "Different Title")
This is the scene that matches a condition.
## Test Scene 2
This is a second scene
## [Test Scene 3]("")
This scene has no title.</textarea>
2014-07-01 18:59:41 -05:00
<div><button onclick="doIt()">Do It</button></div>
<pre id="output">
</pre>
</div>
<script src="ficdown.js"></script>
<script>
(function doIt(){
2014-07-01 18:59:41 -05:00
var storyText = document.getElementById('input').value;
var story = parseText(storyText);
document.getElementById('output').innerHTML = JSON.stringify(story,null,2);
})()
2014-07-01 18:59:41 -05:00
</script>
</body>
</html>