mirror of
https://gitee.com/openharmony/applications_notes
synced 2024-11-23 07:30:27 +00:00
commit
1a4d1416cc
@ -4,19 +4,20 @@
|
||||
<title>
|
||||
"editorJs"
|
||||
</title>
|
||||
<meta
|
||||
http-equiv="Content-Type"
|
||||
content="text/html; charset=UTF-8">
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="editor_style.css">
|
||||
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" type="text/css" href="editor_style.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body onload="load()">
|
||||
<div class="edit-box">
|
||||
<div
|
||||
id="editorjs"
|
||||
contenteditable="true">
|
||||
|
||||
|
||||
<div id="editorjs" contenteditable="true">
|
||||
|
||||
</div>
|
||||
<div class="button-box" id="buttonBox">
|
||||
<div id="addToDo">
|
||||
@ -34,8 +35,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="rich_editor.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="rich_editor.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -37,7 +37,7 @@ body {
|
||||
background-size: cover;
|
||||
color: #182431;
|
||||
opacity: 0.9;
|
||||
font-size: 16vp;
|
||||
font-size: 24px;
|
||||
overflow: scroll;
|
||||
user-select: none;
|
||||
}
|
||||
|
@ -428,6 +428,13 @@ RICH_EDITOR.insertImageHtml = function (contents) {
|
||||
selection.getRangeAt(0).insertNode(img);
|
||||
};
|
||||
|
||||
document.getElementById('addToDo').addEventListener('click', (e) => {
|
||||
console.info(`lsq: e is ${JSON.stringify(e)}`)
|
||||
if (e.id !== 'editorjs') {
|
||||
e.preventDefault()
|
||||
}
|
||||
})
|
||||
|
||||
document.getElementById('addToDo').addEventListener('click', () => {
|
||||
callBackToApp.addToDo()
|
||||
})
|
||||
@ -443,12 +450,12 @@ document.getElementById('openAlbum').addEventListener('click', () => {
|
||||
|
||||
function changeSizeToRk() {
|
||||
document.getElementById('editorjs').style.fontSize = '24px';
|
||||
document.getElementById('img1').style.fontSize = '40px';
|
||||
document.getElementById('img1').style.fontSize = '40px';
|
||||
document.getElementById('img2').style.fontSize = '40px';
|
||||
document.getElementById('img2').style.fontSize = '40px';
|
||||
document.getElementById('img3').style.fontSize = '40px';
|
||||
document.getElementById('img3').style.fontSize = '40px';
|
||||
document.getElementById('img1').style.width = '40px';
|
||||
document.getElementById('img1').style.height = '40px';
|
||||
document.getElementById('img2').style.width = '40px';
|
||||
document.getElementById('img2').style.height = '40px';
|
||||
document.getElementById('img3').style.width = '40px';
|
||||
document.getElementById('img3').style.height = '40px';
|
||||
document.getElementById('lable1').style.fontSize = '20px';
|
||||
document.getElementById('lable2').style.fontSize = '20px';
|
||||
document.getElementById('lable3').style.fontSize = '20px';
|
||||
@ -456,12 +463,12 @@ function changeSizeToRk() {
|
||||
|
||||
function changeSizeToPhone() {
|
||||
document.getElementById('editorjs').style.fontSize = '16px';
|
||||
document.getElementById('img1').style.fontSize = '24px';
|
||||
document.getElementById('img1').style.fontSize = '24px';
|
||||
document.getElementById('img2').style.fontSize = '24px';
|
||||
document.getElementById('img2').style.fontSize = '24px';
|
||||
document.getElementById('img3').style.fontSize = '24px';
|
||||
document.getElementById('img3').style.fontSize = '24px';
|
||||
document.getElementById('img1').style.width = '24px';
|
||||
document.getElementById('img1').style.height = '24px';
|
||||
document.getElementById('img2').style.width = '24px';
|
||||
document.getElementById('img2').style.height = '24px';
|
||||
document.getElementById('img3').style.width = '24px';
|
||||
document.getElementById('img3').style.height = '24px';
|
||||
document.getElementById('lable1').style.fontSize = '12px';
|
||||
document.getElementById('lable2').style.fontSize = '12px';
|
||||
document.getElementById('lable3').style.fontSize = '12px';
|
||||
@ -469,12 +476,12 @@ function changeSizeToPhone() {
|
||||
|
||||
function changeSizeToTablet() {
|
||||
document.getElementById('editorjs').style.fontSize = '16px';
|
||||
document.getElementById('img1').style.fontSize = '28px';
|
||||
document.getElementById('img1').style.fontSize = '28px';
|
||||
document.getElementById('img2').style.fontSize = '28px';
|
||||
document.getElementById('img2').style.fontSize = '28px';
|
||||
document.getElementById('img3').style.fontSize = '28px';
|
||||
document.getElementById('img3').style.fontSize = '28px';
|
||||
document.getElementById('img1').style.width = '28px';
|
||||
document.getElementById('img1').style.height = '28px';
|
||||
document.getElementById('img2').style.width = '28px';
|
||||
document.getElementById('img2').style.height = '28px';
|
||||
document.getElementById('img3').style.width = '28px';
|
||||
document.getElementById('img3').style.height = '28px';
|
||||
document.getElementById('lable1').style.fontSize = '12px';
|
||||
document.getElementById('lable2').style.fontSize = '12px';
|
||||
document.getElementById('lable3').style.fontSize = '12px';
|
||||
@ -485,7 +492,7 @@ function hiddenButton() {
|
||||
}
|
||||
|
||||
RICH_EDITOR.getFocus = function() {
|
||||
return document.GetElementById('editorjs').focus();
|
||||
return document.getElementById('editorjs').focus();
|
||||
}
|
||||
|
||||
document.getElementById('editorjs').addEventListener('click', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user