editor tabIndex
This commit is contained in:
@ -464,7 +464,7 @@ function log(o) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="noteTitleDiv">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -488,7 +488,7 @@ function log(o) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 由此可以算高度 -->
|
<!-- 由此可以算高度 -->
|
||||||
<div id="editorContent" name="editorContent">
|
<div id="editorContent" name="editorContent" tabindex="2" />
|
||||||
{{.noteContent}}
|
{{.noteContent}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -501,7 +501,7 @@ function log(o) {
|
|||||||
<div class="clearfix" id="mdEditorPreview">
|
<div class="clearfix" id="mdEditorPreview">
|
||||||
<div id="left-column" class="pull-left">
|
<div id="left-column" class="pull-left">
|
||||||
<div id="wmd-panel-editor" class="wmd-panel-editor">
|
<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>
|
</div>
|
||||||
<div id="right-column" class="pull-right">
|
<div id="right-column" class="pull-right">
|
||||||
|
@ -464,7 +464,7 @@ function log(o) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="noteTitleDiv">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -488,7 +488,7 @@ function log(o) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 由此可以算高度 -->
|
<!-- 由此可以算高度 -->
|
||||||
<div id="editorContent" name="editorContent">
|
<div id="editorContent" name="editorContent" tabindex="2" />
|
||||||
{{.noteContent}}
|
{{.noteContent}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -501,7 +501,7 @@ function log(o) {
|
|||||||
<div class="clearfix" id="mdEditorPreview">
|
<div class="clearfix" id="mdEditorPreview">
|
||||||
<div id="left-column" class="pull-left">
|
<div id="left-column" class="pull-left">
|
||||||
<div id="wmd-panel-editor" class="wmd-panel-editor">
|
<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>
|
</div>
|
||||||
<div id="right-column" class="pull-right">
|
<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) {
|
function switchEditor(isMarkdown) {
|
||||||
// 富文本永远是2
|
// 富文本永远是2
|
||||||
|
|
||||||
if(!isMarkdown) {
|
if(!isMarkdown) {
|
||||||
$("#editor").show();
|
$("#editor").show();
|
||||||
$("#mdEditor").css("z-index", 1);
|
$("#mdEditor").css("z-index", 1);
|
||||||
|
|
||||||
|
// 刚开始没有
|
||||||
|
editorIframeTabindex(2);
|
||||||
|
$("#wmd-input").attr("tabindex", 3);
|
||||||
} else {
|
} else {
|
||||||
$("#mdEditor").css("z-index", 3).show();
|
$("#mdEditor").css("z-index", 3).show();
|
||||||
|
|
||||||
|
editorIframeTabindex(3);
|
||||||
|
$("#wmd-input").attr("tabindex", 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user