From 262f3b3b64d74f0656a86cd037bff064b65fce2f Mon Sep 17 00:00:00 2001 From: zhanghongchuan33 Date: Fri, 29 Apr 2022 15:23:51 +0800 Subject: [PATCH 1/6] Symbol transcoding Signed-off-by: zhanghongchuan33 --- common/resources/src/main/resources/rawfile/rich_editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/resources/src/main/resources/rawfile/rich_editor.js b/common/resources/src/main/resources/rawfile/rich_editor.js index ee14669..35420df 100644 --- a/common/resources/src/main/resources/rawfile/rich_editor.js +++ b/common/resources/src/main/resources/rawfile/rich_editor.js @@ -18,7 +18,7 @@ var RICH_EDITOR = {}; RICH_EDITOR.editor = document.getElementById('editorjs'); RICH_EDITOR.setHtml = function(contents) { - RICH_EDITOR.editor.innerHTML = contents.replace(/\+/g, '%20'); + RICH_EDITOR.editor.innerHTML = contents.replace(/%20/g, '+'); } RICH_EDITOR.getHtml = function() { @@ -318,7 +318,7 @@ function get_html_content() { function save_html_content() { console.log('save_html_content'); var htmlString = RICH_EDITOR.getHtml() - var str = callBackToApp.callbackhtmlSave(htmlString) + var str = callBackToApp.callbackhtmlSave(htmlString.replace(/\+/g, '%20')) console.log('save_html_content end'); } From a72947a39b4e311a56839e26511637b50e3dd415 Mon Sep 17 00:00:00 2001 From: zhanghongchuan33 Date: Fri, 29 Apr 2022 15:37:59 +0800 Subject: [PATCH 2/6] Symbol transcoding Signed-off-by: zhanghongchuan33 --- .../src/main/resources/rawfile/rich_editor.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/resources/src/main/resources/rawfile/rich_editor.js b/common/resources/src/main/resources/rawfile/rich_editor.js index 35420df..dbc3d7c 100644 --- a/common/resources/src/main/resources/rawfile/rich_editor.js +++ b/common/resources/src/main/resources/rawfile/rich_editor.js @@ -82,7 +82,7 @@ RICH_EDITOR.getListStyle = function () { } } } catch (err) { - + console.error(err) } } @@ -112,7 +112,7 @@ RICH_EDITOR.setNumbers = function () { } } } catch (err) { - + console.error(err) } } } @@ -141,7 +141,7 @@ RICH_EDITOR.setABC = function () { } } } catch (err) { - + console.error(err) } } } @@ -170,7 +170,7 @@ RICH_EDITOR.setBullets = function () { } } } catch (err) { - + console.error(err) } } } @@ -199,7 +199,7 @@ RICH_EDITOR.setSquare = function () { } } } catch (err) { - + console.error(err) } } } From a385504a93456fdc392dd846d88f85c2d1a205b1 Mon Sep 17 00:00:00 2001 From: zhanghongchuan33 Date: Thu, 5 May 2022 09:42:06 +0800 Subject: [PATCH 3/6] Symbol transcoding Signed-off-by: zhanghongchuan33 --- .../src/main/resources/rawfile/rich_editor.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/common/resources/src/main/resources/rawfile/rich_editor.js b/common/resources/src/main/resources/rawfile/rich_editor.js index dbc3d7c..48e85ab 100644 --- a/common/resources/src/main/resources/rawfile/rich_editor.js +++ b/common/resources/src/main/resources/rawfile/rich_editor.js @@ -12,6 +12,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import {LogUtil} from '../../../../../utils/src/main/ets/default/baseUtil/LogUtil' + +const TAG = "Rich_Editor" var RICH_EDITOR = {}; @@ -82,7 +85,7 @@ RICH_EDITOR.getListStyle = function () { } } } catch (err) { - console.error(err) + LogUtil(TAG, err) } } @@ -112,7 +115,7 @@ RICH_EDITOR.setNumbers = function () { } } } catch (err) { - console.error(err) + LogUtil(TAG, err) } } } @@ -141,7 +144,7 @@ RICH_EDITOR.setABC = function () { } } } catch (err) { - console.error(err) + LogUtil(TAG, err)) } } } @@ -170,7 +173,7 @@ RICH_EDITOR.setBullets = function () { } } } catch (err) { - console.error(err) + LogUtil(TAG, err) } } } @@ -199,7 +202,7 @@ RICH_EDITOR.setSquare = function () { } } } catch (err) { - console.error(err) + LogUtil(TAG, err) } } } From d4a19791bf49289d15cc29f1c3772109ed8c7503 Mon Sep 17 00:00:00 2001 From: zhanghongchuan33 Date: Thu, 5 May 2022 09:43:39 +0800 Subject: [PATCH 4/6] Symbol transcoding Signed-off-by: zhanghongchuan33 --- common/resources/src/main/resources/rawfile/rich_editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/resources/src/main/resources/rawfile/rich_editor.js b/common/resources/src/main/resources/rawfile/rich_editor.js index 48e85ab..f0b13ce 100644 --- a/common/resources/src/main/resources/rawfile/rich_editor.js +++ b/common/resources/src/main/resources/rawfile/rich_editor.js @@ -144,7 +144,7 @@ RICH_EDITOR.setABC = function () { } } } catch (err) { - LogUtil(TAG, err)) + LogUtil(TAG, err) } } } From 728cd483de21c4fc6451496e792891b0f4e8746f Mon Sep 17 00:00:00 2001 From: zhanghongchuan33 Date: Thu, 5 May 2022 09:58:35 +0800 Subject: [PATCH 5/6] Symbol transcoding Signed-off-by: zhanghongchuan33 --- common/resources/src/main/resources/rawfile/rich_editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/resources/src/main/resources/rawfile/rich_editor.js b/common/resources/src/main/resources/rawfile/rich_editor.js index f0b13ce..5e309ec 100644 --- a/common/resources/src/main/resources/rawfile/rich_editor.js +++ b/common/resources/src/main/resources/rawfile/rich_editor.js @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {LogUtil} from '../../../../../utils/src/main/ets/default/baseUtil/LogUtil' +import {LogUtil} from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' const TAG = "Rich_Editor" From eef32a28333dfd2f937e1540da58417ff628a2e7 Mon Sep 17 00:00:00 2001 From: zhanghongchuan33 Date: Thu, 5 May 2022 10:57:55 +0800 Subject: [PATCH 6/6] Symbol transcoding Signed-off-by: zhanghongchuan33 --- .../src/main/resources/rawfile/rich_editor.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/resources/src/main/resources/rawfile/rich_editor.js b/common/resources/src/main/resources/rawfile/rich_editor.js index 5e309ec..f14a761 100644 --- a/common/resources/src/main/resources/rawfile/rich_editor.js +++ b/common/resources/src/main/resources/rawfile/rich_editor.js @@ -85,7 +85,7 @@ RICH_EDITOR.getListStyle = function () { } } } catch (err) { - LogUtil(TAG, err) + LogUtil.error(TAG, err) } } @@ -115,7 +115,7 @@ RICH_EDITOR.setNumbers = function () { } } } catch (err) { - LogUtil(TAG, err) + LogUtil.error(TAG, err) } } } @@ -144,7 +144,7 @@ RICH_EDITOR.setABC = function () { } } } catch (err) { - LogUtil(TAG, err) + LogUtil.error(TAG, err) } } } @@ -173,7 +173,7 @@ RICH_EDITOR.setBullets = function () { } } } catch (err) { - LogUtil(TAG, err) + LogUtil.error(TAG, err) } } } @@ -202,7 +202,7 @@ RICH_EDITOR.setSquare = function () { } } } catch (err) { - LogUtil(TAG, err) + LogUtil.error(TAG, err) } } }