diff --git a/tpl/default/editlink.html b/tpl/default/editlink.html index d6f81f96..2180c080 100644 --- a/tpl/default/editlink.html +++ b/tpl/default/editlink.html @@ -59,7 +59,7 @@

{'Shaare'|t}

- + {if="!$link_is_new"} diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index d47c257f..f7de0a49 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js @@ -256,7 +256,14 @@ window.onload = function () { resize(); } + if (description != null) { init(); + // Submit editlink form with CTRL + Enter in the text area. + description.addEventListener('keydown', function (event) { + if (event.ctrlKey && event.keyCode === 13) { + document.getElementById('button-save-edit').click(); + } + }); } };