How to make Ace Grow editor and fill a table cell in the same way as a div? I just want the manuscriptdiv editor to grow and fill in the same way as the div Article, increasing the height of the whole page.
Code @ https://github.com/viruliant/gh-template/
Demo: https://viruliant.imtqy.com/gh-template/
<!DOCTYPE html><html><head><meta charset="utf-8"><title>
viruliant.imtqy.com/gh-template
</title><meta name="description" content="Github Pages Template using client-side JS markdown for styling plaintext .md files">
<link rel="stylesheet" href="./jquery-ui-1.11.2.custom/jquery-ui.css" type="text/css" />
<link rel="stylesheet" href="./jquery-ui-1.11.2.custom/jquery-ui.theme.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="./default.css"/>
<style type="text/css">
#Page-Table { min-height:100%; width:100%; margin:0; }
#Page-Table, #Content, #Left, #Right, #Header, #Footer, #Manuscript, #Manuscript { height:100%;
top: 0; bottom: 0; left: 0; right: 0; position: relative;
border:0; margin:0; padding:0;
}
#Page-Table, #Left-cell, #Right-cell, #Content-cell, #Header-cell, #Footer-cell {
border:0; padding:0; border-collapse: collapse;
}
#Left-cell, #Right-cell { width:10%; }
#Content-cell { height: 100%; width:80%; }
#Header-cell, #Footer-cell { height:64px; }
#Header, #Footer { background: #FFF; }
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full"></script>
<script src="./ace-builds/src-min-noconflict/ace.js"></script>
<script src="./showdown/compressed/Showdown.min.js"></script>
<script src="./showdown/compressed/extensions/table.min.js"></script>
<script src="./default.js"></script><script>window.onload = function() {
$( "#Content" ).tabs({ event: "mouseover" });
var Editor = ace.edit("Manuscript");
Editor.setTheme("ace/theme/twilight");
Editor.getSession().setMode("ace/mode/markdown");
jQuery.get('README.md', function(data) { Editor.setValue(data); });
var converter = new Showdown.converter({ extensions: ['table'] });
Editor.getSession().on('change', function(e) {
document.getElementById("Article").innerHTML = converter.makeHtml(Editor.getValue())
});
};</script>
</head><body>
<table id="Page-Table">
<tr><td id="Header-cell" colspan="3"><div id="Header"></div></td></tr>
<tr>
<td id="Left-cell"><div id="Left"></div></td>
<td id="Content-cell">
<div id="Content">
<ul><li><a href="#Article">Article</a></li>
<li><a href="#Manuscript">Manuscript</a></li></ul>
<div id="Article"></div>
<div id="Manuscript"></div>
</div>
</td>
<td id="Right-cell"><div id="Right"></div></td>
</tr>
<tr><td id="Footer-cell" colspan="3"><div id="Footer"></div></td></tr>
</table>
</body></html>
UPDATE: to check your changes you can simply do git clone --recursive https://github.com/viruliant/gh-template/and open index.html OR run the nodejs file to get readme.md to work correctly
source
share