mirror of
https://gitee.com/openharmony/applications_notes
synced 2024-11-26 17:20:25 +00:00
修复备忘录jscrash
Signed-off-by: zwx1126739 <zhanghong121@huawei.com>
This commit is contained in:
parent
20d3ce52dc
commit
c0503b2a46
@ -451,12 +451,18 @@ export struct NoteItemComp {
|
||||
LogUtil.info(TAG, "NoteItemComp, set continue note success")
|
||||
}
|
||||
if (this.portraitModel == false) {
|
||||
this.controllerShow.runJavaScript(
|
||||
"RICH_EDITOR.setHtml('" + this.selectedNoteData?.content_text + "')"
|
||||
)
|
||||
this.controllerShow.runJavaScript(
|
||||
"RICH_EDITOR.cancelSelection()"
|
||||
)
|
||||
try {
|
||||
this.controllerShow.runJavaScript(
|
||||
"RICH_EDITOR.setHtml('" + this.selectedNoteData?.content_text + "')"
|
||||
)
|
||||
this.controllerShow.runJavaScript(
|
||||
"RICH_EDITOR.cancelSelection()"
|
||||
)
|
||||
LogUtil.info(TAG, `runJavaScript setHtml and cancelSelection success`);
|
||||
} catch (error) {
|
||||
LogUtil.error(TAG, `runJavaScript setHtml and cancelSelection failed.
|
||||
code:${JSON.stringify(error.code)},message:${JSON.stringify(error.message)}`);
|
||||
}
|
||||
}
|
||||
if (this.portraitModel == true) {
|
||||
AppStorage.SetOrCreate<NoteData>('NewNote', this.selectedNoteData)
|
||||
|
Loading…
Reference in New Issue
Block a user