mirror of
https://gitee.com/openharmony/applications_notes
synced 2024-10-06 21:23:27 +00:00
commit
5b5e59ac40
@ -442,9 +442,15 @@ struct FolderItemComp {
|
|||||||
}
|
}
|
||||||
// 刷新web界面
|
// 刷新web界面
|
||||||
if (this.portraitModel == false) {
|
if (this.portraitModel == false) {
|
||||||
this.controllerShow.runJavaScript(
|
try {
|
||||||
"RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')"
|
this.controllerShow.runJavaScript(
|
||||||
)
|
"RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')"
|
||||||
|
);
|
||||||
|
LogUtil.info(this.TAG, `onClick runJavaScript setHtml success.`);
|
||||||
|
} catch (error) {
|
||||||
|
LogUtil.error(this.TAG, `onClick runJavaScript setHtml failed,code:${JSON.stringify(error.code)},
|
||||||
|
message:${JSON.stringify(error.message)}.`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// save continue data
|
// save continue data
|
||||||
let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject())
|
let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject())
|
||||||
@ -501,9 +507,15 @@ struct FolderItemComp {
|
|||||||
}
|
}
|
||||||
// 刷新web界面
|
// 刷新web界面
|
||||||
if (this.portraitModel == false) {
|
if (this.portraitModel == false) {
|
||||||
this.controllerShow.runJavaScript(
|
try {
|
||||||
"RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')"
|
this.controllerShow.runJavaScript(
|
||||||
)
|
"RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')"
|
||||||
|
);
|
||||||
|
LogUtil.info(this.TAG, `else runJavaScript setHtml success.`);
|
||||||
|
} catch (error) {
|
||||||
|
LogUtil.info(this.TAG, `else runJavaScript setHtml failed.code:${JSON.stringify(error.code)},
|
||||||
|
message:${JSON.stringify(error.message)}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// save continue data
|
// save continue data
|
||||||
let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject())
|
let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject())
|
||||||
|
@ -232,7 +232,13 @@ export struct NoteContent {
|
|||||||
clearInterval(timeID)
|
clearInterval(timeID)
|
||||||
}
|
}
|
||||||
timeID = setInterval(() => {
|
timeID = setInterval(() => {
|
||||||
this.controllerShow.runJavaScript("scheduledSaveContent()")
|
try {
|
||||||
|
this.controllerShow.runJavaScript("scheduledSaveContent()");
|
||||||
|
LogUtil.info(TAG, `runJavaScript scheduledSaveContent success.`);
|
||||||
|
} catch (error) {
|
||||||
|
LogUtil.info(TAG, `runJavaScript scheduledSaveContent failed.code:${JSON.stringify(error.code)},
|
||||||
|
message:${JSON.stringify(error.message)}`);
|
||||||
|
}
|
||||||
}, 3000)
|
}, 3000)
|
||||||
LogUtil.info(TAG, "setInterval timeID : " + timeID)
|
LogUtil.info(TAG, "setInterval timeID : " + timeID)
|
||||||
this.issave = 0
|
this.issave = 0
|
||||||
@ -288,8 +294,15 @@ export struct ToolBarComp {
|
|||||||
.height(24)
|
.height(24)
|
||||||
.width(24)
|
.width(24)
|
||||||
.onClick(() => {
|
.onClick(() => {
|
||||||
this.controllerShow.runJavaScript("RICH_EDITOR.setInputEnabled(false)")
|
try {
|
||||||
this.controllerShow.runJavaScript("getHtmlContent()")
|
this.controllerShow.runJavaScript("RICH_EDITOR.setInputEnabled(false)");
|
||||||
|
this.controllerShow.runJavaScript("getHtmlContent()");
|
||||||
|
LogUtil.info(TAG, `runJavaScript setInputEnabled and getHtmlContent success.`);
|
||||||
|
} catch (error) {
|
||||||
|
LogUtil.info(TAG, `runJavaScript setInputEnabled and getHtmlContent fail.code:${JSON.stringify(error.code)},
|
||||||
|
message:${JSON.stringify(error.message)}`);
|
||||||
|
}
|
||||||
|
|
||||||
// 清除定时器
|
// 清除定时器
|
||||||
if (timeID != undefined) {
|
if (timeID != undefined) {
|
||||||
LogUtil.info(TAG, "zoom, clearInterval timeID : " + timeID)
|
LogUtil.info(TAG, "zoom, clearInterval timeID : " + timeID)
|
||||||
|
@ -69,7 +69,13 @@ export struct NoteContentComp {
|
|||||||
if (!this.refreshCurrentNote) {
|
if (!this.refreshCurrentNote) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.controllerShow.runJavaScript("RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')")
|
try {
|
||||||
|
this.controllerShow.runJavaScript("RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')");
|
||||||
|
LogUtil.info(TAG, `runJavaScript setHtml success.`);
|
||||||
|
} catch (error) {
|
||||||
|
LogUtil.error(TAG, `runJavaScript setHtml failed.code:${JSON.stringify(error.code)},
|
||||||
|
message:${JSON.stringify(error.message)}`);
|
||||||
|
}
|
||||||
this.refreshCurrentNote = false
|
this.refreshCurrentNote = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user