Comments (3)
Just pinging here, as it quite serious issue for us
from richeditor-android.
Ping again :)
from richeditor-android.
对源码做如下修改:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="user-scalable=no">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="normalize.css">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="checkbox_style.css">
</head>
<body>
<div id="editor" contenteditable="true"></div>
<script type="text/javascript" src="rich_editor.js"></script>
</body>
</html>
checkbox_style.css
input[type=checkbox] {
cursor: pointer;
position: relative;
}
input[type=checkbox]:not([class=checkbox-checked]):after {
position: absolute;
top: 0;
background-color: white;
width: 18px;
height: 18px;
display: inline-block;
visibility: visible;
padding-left: 0px;
text-align: center;
content: '';
border-radius: 2px;
box-sizing: border-box;
border: 1px solid #ddd;
}
.checkbox-checked::after {
position: absolute;
top: 0;
background-color: blue;
width: 18px;
height: 18px;
display: inline-block;
visibility: visible;
padding-left: 0px;
text-align: center;
content: '';
border-radius: 2px;
box-sizing: border-box;
border: 1px solid #ddd;
}
/**选中对号样式*/
.checkbox-checked::before {
content: '';
position: absolute;
top: 1px;
left: 6px;
width: 4px;
height: 10px;
border: solid white;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
z-index: 1;
}
rich_editor.js 最后面添加
// 复选框点击事件
RE.editor.addEventListener("click", function(ev){
var target = ev.target || ev.srcElement;
if(target.nodeName.toLowerCase() == 'input' && target.type == 'checkbox'){
if(target.className == 'checkbox-checked'){
target.removeAttribute("class");
}else {
target.className = 'checkbox-checked';
}
}
});
from richeditor-android.
Related Issues (20)
- 点到placeholder的时候,placeholder会被清除,但是光标不会出现,想让光标出现,怎么设置
- How to store image file to server? HOT 1
- bug
- Checkbox state in Android
- Not able to Parse to EditText
- how to display image when setHtml contains path <img src="content://com.android.providers.media.documents/document/image%3A12591" alt="dachshund" width="413" height= "550"> HOT 1
- Text not displayed/entered when using Japanese Keyboard
- Texting in RichEditor with big html laggng
- How to insert text to rich editor HOT 1
- Change Icon color when selected and non selected
- Super and sub not stop
- Display an image in the RichEditor with an Intent HOT 1
- 字体下划线间距怎么修改
- setOnDecorationChangeListener not working HOT 1
- What is the format of the output? Can you show it on the web side
- How to add local mp3 file in <audio>?
- default font family
- unable to remove style HOT 1
- how to use height wrap content
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from richeditor-android.