Revision 690858f7
Von Sven Schöling vor mehr als 1 Jahr hinzugefügt
js/kivi.ActionBar.js | ||
---|---|---|
|| (e.target.tagName == 'SELECT')))
|
||
return true;
|
||
|
||
// special case ckeditor: if the event originates from the editable area of the ckeditor, ignore it, otherwise we drown in Enter events
|
||
if (e.target.classList.contains('ck-content'))
|
||
return true;
|
||
|
||
console.warn(e);
|
||
console.warn(this);
|
||
|
||
if ((target in kivi.ActionBar.Accesskeys.actions) && (accesskey in kivi.ActionBar.Accesskeys.actions[target])) {
|
||
e.stopPropagation();
|
||
kivi.ActionBar.Accesskeys.actions[target][accesskey].click();
|
templates/webpages/test/ckeditor.html | ||
---|---|---|
</form>
|
||
</fieldset>
|
||
|
||
<h3>inside div with enter listener</h3>
|
||
|
||
<fieldset>
|
||
<div id='name3div'>
|
||
[% P.textarea_tag('name3', "<p>Try to hit enter here</p>", class="texteditor") %]
|
||
</div>
|
||
<script>
|
||
document.querySelector('#name3div').addEventListener('keypress', function(e) {
|
||
alert("got keypressed event!" + e);
|
||
});
|
||
</script>
|
||
</fieldset>
|
||
|
||
<h3>inside div with jquery enter listener</h3>
|
||
|
||
<fieldset>
|
||
<div id='name4div'>
|
||
[% P.textarea_tag('name4', "<p>Try to hit enter here</p>", class="texteditor") %]
|
||
</div>
|
||
<script>
|
||
$('#name4div').on('keypress', function(e) {
|
||
alert("got keypressed event!" + e);
|
||
});
|
||
</script>
|
||
</fieldset>
|
||
|
||
<h3>initial focus</h3>
|
||
|
||
[% P.textarea_tag('name4', "<p>this is a text</p>", class="texteditor texteditor-autofocus") %]
|
||
[% P.textarea_tag('name5', "<p>this is a text</p>", class="texteditor texteditor-autofocus") %]
|
||
|
||
<h3>with custom width/height</h3>
|
||
|
||
[% P.textarea_tag('name5', "<p>this is a text</p>", style="width: 350px; height: 150px", class="texteditor") %]
|
||
[% P.textarea_tag('name6', "<p>this is a text</p>", style="width: 350px; height: 150px", class="texteditor") %]
|
Auch abrufbar als: Unified diff
ckeditor5: ckeditor keypress events in actionbar accesskeys ignorieren