|
|
@ -62,7 +62,7 @@ window.md_rec_data = md_rec_data;
|
|
|
|
function md_elocalStorage(editor,mdu,id){
|
|
|
|
function md_elocalStorage(editor,mdu,id){
|
|
|
|
if (window.sessionStorage){
|
|
|
|
if (window.sessionStorage){
|
|
|
|
var oc = window.sessionStorage.getItem('content'+mdu);
|
|
|
|
var oc = window.sessionStorage.getItem('content'+mdu);
|
|
|
|
if(oc !== null ){
|
|
|
|
if(oc !== null && oc != editor.getValue()){
|
|
|
|
console.log("#e_tips_"+id)
|
|
|
|
console.log("#e_tips_"+id)
|
|
|
|
$("#e_tips_"+id).data('editor', editor);
|
|
|
|
$("#e_tips_"+id).data('editor', editor);
|
|
|
|
var h = '您上次有已保存的数据,是否<a style="cursor: pointer;" class="link-color-blue" onclick="md_rec_data(\'content\',\''+ mdu + '\',\'' + id + '\')">恢复</a> ? / <a style="cursor: pointer;" class="link-color-blue" onclick="md_clear_data(\'content\',\''+ mdu + '\',\'' + id + '\')">不恢复</a>';
|
|
|
|
var h = '您上次有已保存的数据,是否<a style="cursor: pointer;" class="link-color-blue" onclick="md_rec_data(\'content\',\''+ mdu + '\',\'' + id + '\')">恢复</a> ? / <a style="cursor: pointer;" class="link-color-blue" onclick="md_clear_data(\'content\',\''+ mdu + '\',\'' + id + '\')">不恢复</a>';
|
|
|
@ -169,7 +169,7 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback, initV
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$("#" + _id + " [type=\"inline\"]").bind("click", function () {
|
|
|
|
$("#" + _id + " [type=\"inline\"]").bind("click", function () {
|
|
|
|
_editorName.cm.replaceSelection("$$$$");
|
|
|
|
_editorName.cm.replaceSelection("`$$$$`");
|
|
|
|
var __Cursor = _editorName.cm.getDoc().getCursor();
|
|
|
|
var __Cursor = _editorName.cm.getDoc().getCursor();
|
|
|
|
_editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2);
|
|
|
|
_editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2);
|
|
|
|
_editorName.cm.focus();
|
|
|
|
_editorName.cm.focus();
|
|
|
|