mirror of
https://gitee.com/openharmony/applications_notes
synced 2024-10-06 21:23:27 +00:00
!250 规避接口javaScriptProxy异常导致的js调用失败
Merge pull request !250 from nobbo/master
This commit is contained in:
commit
c414497e43
@ -400,13 +400,15 @@ function getImagePathFromContent(contentInfo) {
|
||||
}
|
||||
|
||||
function scheduledSaveContent() {
|
||||
console.info('scheduledSaveContent');
|
||||
var htmlString = RICH_EDITOR.getHtml();
|
||||
let imgName = getImagePathFromContent(htmlString);
|
||||
htmlString = window.btoa(unescape(encodeURIComponent(htmlString)));
|
||||
callBackToApp.callbackImagePath(imgName);
|
||||
var str = callBackToApp.callbackScheduledSave(htmlString);
|
||||
console.info('scheduledSaveContent end');
|
||||
if (callBackToApp !== undefined) {
|
||||
console.info('scheduledSaveContent');
|
||||
var htmlString = RICH_EDITOR.getHtml();
|
||||
let imgName = getImagePathFromContent(htmlString);
|
||||
htmlString = window.btoa(unescape(encodeURIComponent(htmlString)));
|
||||
callBackToApp.callbackImagePath(imgName);
|
||||
var str = callBackToApp.callbackScheduledSave(htmlString);
|
||||
console.info('scheduledSaveContent end');
|
||||
}
|
||||
}
|
||||
|
||||
document.body.addEventListener('paste', (event) => {
|
||||
@ -504,7 +506,5 @@ RICH_EDITOR.getFocus = function () {
|
||||
}
|
||||
|
||||
document.getElementById('editorjs_box').addEventListener('click', () => {
|
||||
if (callBackToApp.getBreakPoint() === 'sm') {
|
||||
document.getElementById('buttonBox').style.display = 'flex';
|
||||
}
|
||||
document.getElementById('buttonBox').style.display = 'flex';
|
||||
})
|
Loading…
Reference in New Issue
Block a user