diff --git a/common/component/src/main/ets/components/NoteContentComp.ets b/common/component/src/main/ets/components/NoteContentComp.ets index 86c8c9670cf66701ee298bc4b53f9e2e9ac3ab12..d0ab475fe7b405e7ee3b89065c9335ad46e8bb6c 100644 --- a/common/component/src/main/ets/components/NoteContentComp.ets +++ b/common/component/src/main/ets/components/NoteContentComp.ets @@ -149,11 +149,11 @@ export struct NoteContentComp { } }) .zoomAccess(false) - .height('70%') + .height('88%') .width('100%') } .margin({ left: 24, right: 24 }) - .width(StyleConstants.PERCENTAGE_100) +// .width(StyleConstants.PERCENTAGE_100) .enabled(this.selectedNoteData && this.selectedNoteData.is_deleted == Delete.Yes ? false : true) .onClick(() => { this.issave = 0 diff --git a/common/resources/src/main/resources/rawfile/rich_editor.js b/common/resources/src/main/resources/rawfile/rich_editor.js index eeaa938aa24199cb201705e550de83ddb1649d96..8ec52a17fdc2ece23079b3c9a401b95b0aeead3f 100644 --- a/common/resources/src/main/resources/rawfile/rich_editor.js +++ b/common/resources/src/main/resources/rawfile/rich_editor.js @@ -69,27 +69,28 @@ RICH_EDITOR.getListStyle = function () { selection = getSelection(); } if (selection) { - var range = selection.getRangeAt ? selection.getRangeAt(0) : selection.createRange(); - try { - var child = range.commonAncestorContainer.parentNode; - for (var i = 0; i < 10; i++) { - if (child.nodeName === 'OL') { - console.info('insertOrderedList'); - document.execCommand('insertOrderedList', false, null); - return child.style['list-style']; - } - if (child.nodeName === 'UL') { - console.info('insertUnorderedList'); - document.execCommand('insertUnorderedList', false, null); - return child.style['list-style']; - } - if (child.parentNode) { - child = child.parentNode; - } + return + } + var range = selection.getRangeAt ? selection.getRangeAt(0) : selection.createRange(); + try { + var child = range.commonAncestorContainer.parentNode; + for (var i = 0; i < 10; i++) { + if (child.nodeName === 'OL') { + console.info('insertOrderedList'); + document.execCommand('insertOrderedList', false, null); + return child.style['list-style']; + } + if (child.nodeName === 'UL') { + console.info('insertUnorderedList'); + document.execCommand('insertUnorderedList', false, null); + return child.style['list-style']; + } + if (child.parentNode) { + child = child.parentNode; } - } catch (err) { - console.error(err); } + } catch (err) { + console.error(err); } }; @@ -106,21 +107,22 @@ RICH_EDITOR.setNumbers = function () { selection = getSelection(); } if (selection) { - var range = selection.getRangeAt ? selection.getRangeAt(0) : selection.createRange(); - try { - var child = range.commonAncestorContainer.parentNode; - for (var i = 0; i < 10; i++) { - if (child.nodeName === 'OL') { - child.style['list-style'] = 'decimal'; - break; - } - if (child.parentNode) { - child = child.parentNode; - } + return + } + var range = selection.getRangeAt ? selection.getRangeAt(0) : selection.createRange(); + try { + var child = range.commonAncestorContainer.parentNode; + for (var i = 0; i < 10; i++) { + if (child.nodeName === 'OL') { + child.style['list-style'] = 'decimal'; + break; + } + if (child.parentNode) { + child = child.parentNode; } - } catch (err) { - console.error(err); } + } catch (err) { + console.error(err); } }; @@ -136,21 +138,22 @@ RICH_EDITOR.setABC = function () { selection = getSelection(); } if (selection) { - var range = selection.getRangeAt ? selection.getRangeAt(0) : selection.createRange(); - try { - var child = range.commonAncestorContainer.parentNode; - for (var i = 0; i < 10; i++) { - if (child.nodeName === 'OL') { - child.style['list-style'] = 'lower-alpha'; - break; - } - if (child.parentNode) { - child = child.parentNode; - } + return + } + var range = selection.getRangeAt ? selection.getRangeAt(0) : selection.createRange(); + try { + var child = range.commonAncestorContainer.parentNode; + for (var i = 0; i < 10; i++) { + if (child.nodeName === 'OL') { + child.style['list-style'] = 'lower-alpha'; + break; + } + if (child.parentNode) { + child = child.parentNode; } - } catch (err) { - console.error(err); } + } catch (err) { + console.error(err); } }; @@ -166,21 +169,22 @@ RICH_EDITOR.setBullets = function () { selection = getSelection(); } if (selection) { - var range = selection.getRangeAt ? selection.getRangeAt(0) : selection.createRange(); - try { - var child = range.commonAncestorContainer.parentNode; - for (var i = 0; i < 10; i++) { - if (child.nodeName === 'UL') { - child.style['list-style'] = 'disc'; - break; - } - if (child.parentNode) { - child = child.parentNode; - } + return + } + var range = selection.getRangeAt ? selection.getRangeAt(0) : selection.createRange(); + try { + var child = range.commonAncestorContainer.parentNode; + for (var i = 0; i < 10; i++) { + if (child.nodeName === 'UL') { + child.style['list-style'] = 'disc'; + break; + } + if (child.parentNode) { + child = child.parentNode; } - } catch (err) { - console.error(err); } + } catch (err) { + console.error(err); } }; @@ -196,21 +200,22 @@ RICH_EDITOR.setSquare = function () { selection = getSelection(); } if (selection) { - var range = selection.getRangeAt ? selection.getRangeAt(0) : selection.createRange(); - try { - var child = range.commonAncestorContainer.parentNode; - for (var i = 0; i < 10; i++) { - if (child.nodeName === 'UL') { - child.style['list-style'] = 'square'; - break; - } - if (child.parentNode) { - child = child.parentNode; - } + return + } + var range = selection.getRangeAt ? selection.getRangeAt(0) : selection.createRange(); + try { + var child = range.commonAncestorContainer.parentNode; + for (var i = 0; i < 10; i++) { + if (child.nodeName === 'UL') { + child.style['list-style'] = 'square'; + break; + } + if (child.parentNode) { + child = child.parentNode; } - } catch (err) { - console.error(err); } + } catch (err) { + console.error(err); } }; diff --git a/product/phone/src/main/module.json5 b/product/phone/src/main/module.json5 index 2f360f80f0a918566b9e79dfe6a2922b54f62170..b2038c6ae01da4ab66b56cd2076a2256fd626d6c 100644 --- a/product/phone/src/main/module.json5 +++ b/product/phone/src/main/module.json5 @@ -58,7 +58,9 @@ "action.system.home" ] } - ] + ], + "startWindowBackground": "$color:color_1", + "startWindowIcon": "$media:note" } ] } diff --git a/product/phone/src/main/resources/base/element/color.json b/product/phone/src/main/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..0c413afad79dba84fe7c819b4fdee0cc6972cade --- /dev/null +++ b/product/phone/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "color_1", + "value": "#fff" + } + ] +} \ No newline at end of file diff --git a/product/phone/src/main/resources/base/element/string.json b/product/phone/src/main/resources/base/element/string.json index 85dc25a418d5a8c689c867d0246a62057ec13859..3650d72362e01f7dab414c92f1f4473c37b36137 100644 --- a/product/phone/src/main/resources/base/element/string.json +++ b/product/phone/src/main/resources/base/element/string.json @@ -1,5 +1,9 @@ { "string": [ + { + "name": "entry_MainAbility", + "value": "备忘录" + }, { "name": "read_media_permission", "value": "Used to read media file information in external storage of users" diff --git a/product/tablet/src/main/module.json5 b/product/tablet/src/main/module.json5 index 87ab8da27f28bb2b81586c7a4cc6f6d2b40fb0d6..54c3fbbfaaf1f68a8bb0345860163ab5768cae8f 100644 --- a/product/tablet/src/main/module.json5 +++ b/product/tablet/src/main/module.json5 @@ -62,7 +62,9 @@ "action.system.home" ] } - ] + ], + "startWindowBackground": "$color:color_1", + "startWindowIcon": "$media:note" } ] } diff --git a/product/tablet/src/main/resources/base/element/color.json b/product/tablet/src/main/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..0c413afad79dba84fe7c819b4fdee0cc6972cade --- /dev/null +++ b/product/tablet/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "color_1", + "value": "#fff" + } + ] +} \ No newline at end of file diff --git a/product/tablet/src/main/resources/base/element/string.json b/product/tablet/src/main/resources/base/element/string.json index 2043623749eb73bbbae99f17062287167bbc87f6..5a03f94b0cb61b27464bb0a6884bf2108ae3962e 100644 --- a/product/tablet/src/main/resources/base/element/string.json +++ b/product/tablet/src/main/resources/base/element/string.json @@ -1,5 +1,9 @@ { "string": [ + { + "name": "entry_MainAbility", + "value": "备忘录" + }, { "name": "read_media_permission", "value": "Used to read media file information in external storage of users"