| Régler les problèmes de retour à la ligne dans l'éditeur Proposé par Kaër le Sam 30 Nov 2013 - 12:12 - Code:
-
$(function() { var a = $("#text_editor_textarea"); a.length && ((t = a.val()) && $(function() { a.sceditor && (a.sceditor("instance") && a.sceditor("instance").val(t)); }), $(function() { a.closest("form[action='/post']").submit(function() { t = a.val(); (t.indexOf("[/qu" + "ote]") + 1 || t.indexOf("[/c" + "ode]") + 1) && a.val(t.replace(/\[\/(quote|code)\]/g, "[/$1]\n")); }); })); }); Sujets similaires | |
|
| |
|