prototype a vdom-based markdown editor

avoid unnecessary redraws.

discover a bug, apparently vdom replaces all child elements after an
element which was modified.

As such, changing b in [a, b, c, d] causes b, c, and d to be redrawn.
This is undesirable.
This commit is contained in:
ansuz
2016-01-29 15:06:10 +01:00
parent d14e42fedd
commit aa6bbabc62
3 changed files with 405 additions and 0 deletions

40
www/vmd/index.html Normal file
View File

@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
<style>
*{
padding: 0px;
margin: 0px;
}
.half {
position: fixed;
box-sizing: border-box;
border: 1px solid blue;
width: 50vw;
height: 100vh;
font-size: 15px;
background-color: #222;
color: #CCC;
top: 0px;
}
textarea{
left: 0px;
}
#target {
right: 0px;
overflow: scroll;
}
</style>
</head>
<body>
<textarea class="half"></textarea>
<div id="target" class="half">
<div id="inner"></div>
</div>
</body>
</html>