* change tab behavior of kindeditor.

This commit is contained in:
Catouse
2014-08-18 15:14:08 +08:00
parent 59470dc564
commit 4f5dc2ec79

View File

@@ -38,6 +38,7 @@ var fullTools =
$(document).ready(initKindeditor);
function initKindeditor(afterInit)
{
var nextFormControl = 'input:not([type="hidden"]), textarea';
$.each(editor.id, function(key, editorID)
{
editorTool = simpleTools;
@@ -105,6 +106,13 @@ function initKindeditor(afterInit)
});
}
/* End */
},
afterTab: function(id)
{
var $next = $editor.next(nextFormControl);
if(!$next.length) $next = $editor.parent().next().find(nextFormControl);
if(!$next.length) $next = $editor.parent().parent().next().find(nextFormControl);
$next.first().focus();
}
};
try {window.editor['#'] = window.editor[editorID] = K.create('#' + editorID, options);}