1 <form action="edit" method="post">
2 URI: <input type="text" name="uri" value="<% this.uri %>" /><br />
3 News URL: <input type="text" name="news_url" value="<% this.news_url %>" /><br />
4 Image URL: <input type="text" name="image_url" value="<% this.image_url %>" /><br />
6 <textarea rows="3" cols="40" name="headline"><% this.headline %></textarea>
7 <div id="editor" style="position: relative; height: 600px; width: 800px;">
9 Language: <input type="text" name="lang" value="<% this.lang %>" /><br />
10 <input type="submit" name="submit" value="Save" />
12 <script src="/static/ace.js" type="text/javascript" charset="utf-8"></script>
14 var textarea = $('textarea[name="headline"]');
17 var editor = ace.edit("editor");
18 editor.setTheme("ace/theme/monokai");
19 editor.getSession().setMode("ace/mode/html");
20 editor.getSession().setValue(textarea.val());
21 editor.getSession().on('change', function() {
22 textarea.val(editor.getSession().getValue());