5 <h3>standard empty</h3>
7 [% P.textarea_tag('name1', "", class="texteditor") %]
11 [% P.textarea_tag('name2', "<p>this is a text</p>", class="texteditor") %]
13 <h3>inside form (check if enter triggers form.submit)</h3>
16 <form onsubmit="return alert('Submit was triggered');">
17 [% P.textarea_tag('name3', "<p>Try to hit enter here</p>", class="texteditor") %]
18 [% P.input_tag('name4', 'and here...') %]
22 <h3>inside div with enter listener</h3>
26 [% P.textarea_tag('name3', "<p>Try to hit enter here</p>", class="texteditor") %]
29 document.querySelector('#name3div').addEventListener('keypress', function(e) {
30 alert("got keypressed event!" + e);
35 <h3>inside div with jquery enter listener</h3>
39 [% P.textarea_tag('name4', "<p>Try to hit enter here</p>", class="texteditor") %]
42 $('#name4div').on('keypress', function(e) {
43 alert("got keypressed event!" + e);
48 <h3>initial focus</h3>
50 [% P.textarea_tag('name5', "<p>this is a text</p>", class="texteditor texteditor-autofocus") %]
52 <h3>with custom width/height</h3>
54 [% P.textarea_tag('name6', "<p>this is a text</p>", style="width: 350px; height: 150px", class="texteditor") %]