div 的 placeholder
给 div 传递 placeholder 即可
.editor {
width: 100%;
height: 100%;
outline: none;
border: 1px solid #cacdd4;
border-radius: 5px;
box-sizing: border-box;
overflow-y: auto;
padding: 0 5px;
&:empty::before {
content: attr(placeholder);
font-size: 12px;
color: #cacdd4;
}
&:focus:before {
content: none;
}
}