editor tabIndex
This commit is contained in:
@ -464,7 +464,7 @@ function log(o) {
|
||||
</div>
|
||||
|
||||
<div id="noteTitleDiv">
|
||||
<input name="noteTitle" id="noteTitle" value="" placeholder="{{msg . "unTitled"}}">
|
||||
<input name="noteTitle" id="noteTitle" value="" placeholder="{{msg . "unTitled"}}" tabindex="1" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -488,7 +488,7 @@ function log(o) {
|
||||
</div>
|
||||
</div>
|
||||
<!-- 由此可以算高度 -->
|
||||
<div id="editorContent" name="editorContent">
|
||||
<div id="editorContent" name="editorContent" tabindex="2" />
|
||||
{{.noteContent}}
|
||||
</div>
|
||||
</div>
|
||||
@ -501,7 +501,7 @@ function log(o) {
|
||||
<div class="clearfix" id="mdEditorPreview">
|
||||
<div id="left-column" class="pull-left">
|
||||
<div id="wmd-panel-editor" class="wmd-panel-editor">
|
||||
<textarea class="wmd-input theme" id="wmd-input" spellcheck="false"></textarea>
|
||||
<textarea class="wmd-input theme" id="wmd-input" spellcheck="false" tabindex="3"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div id="right-column" class="pull-right">
|
||||
|
@ -464,7 +464,7 @@ function log(o) {
|
||||
</div>
|
||||
|
||||
<div id="noteTitleDiv">
|
||||
<input name="noteTitle" id="noteTitle" value="" placeholder="{{msg . "unTitled"}}">
|
||||
<input name="noteTitle" id="noteTitle" value="" placeholder="{{msg . "unTitled"}}" tabindex="1" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -488,7 +488,7 @@ function log(o) {
|
||||
</div>
|
||||
</div>
|
||||
<!-- 由此可以算高度 -->
|
||||
<div id="editorContent" name="editorContent">
|
||||
<div id="editorContent" name="editorContent" tabindex="2" />
|
||||
{{.noteContent}}
|
||||
</div>
|
||||
</div>
|
||||
@ -501,7 +501,7 @@ function log(o) {
|
||||
<div class="clearfix" id="mdEditorPreview">
|
||||
<div id="left-column" class="pull-left">
|
||||
<div id="wmd-panel-editor" class="wmd-panel-editor">
|
||||
<textarea class="wmd-input theme" id="wmd-input" spellcheck="false"></textarea>
|
||||
<textarea class="wmd-input theme" id="wmd-input" spellcheck="false" tabindex="3"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div id="right-column" class="pull-right">
|
||||
|
File diff suppressed because one or more lines are too long
2
public/js/common-min.js
vendored
2
public/js/common-min.js
vendored
File diff suppressed because one or more lines are too long
@ -270,15 +270,33 @@ ajaxPostJson(
|
||||
*/
|
||||
|
||||
//-----------------
|
||||
|
||||
// 切换编辑器时要修改tabIndex
|
||||
function editorIframeTabindex(index) {
|
||||
var $i = $("#editorContent_ifr");
|
||||
if($i.size() == 0) {
|
||||
setTimeout(function() {
|
||||
editorIframeTabindex(index);
|
||||
}, 100);
|
||||
} else {
|
||||
$i.attr("tabindex", index);
|
||||
}
|
||||
}
|
||||
//切换编辑器
|
||||
function switchEditor(isMarkdown) {
|
||||
// 富文本永远是2
|
||||
|
||||
if(!isMarkdown) {
|
||||
$("#editor").show();
|
||||
$("#mdEditor").css("z-index", 1);
|
||||
|
||||
// 刚开始没有
|
||||
editorIframeTabindex(2);
|
||||
$("#wmd-input").attr("tabindex", 3);
|
||||
} else {
|
||||
$("#mdEditor").css("z-index", 3).show();
|
||||
|
||||
editorIframeTabindex(3);
|
||||
$("#wmd-input").attr("tabindex", 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user