开发者

Jeditable edit without losing styles during editing?

开发者 https://www.devze.com 2023-01-07 11:07 出处:网络
Is it possible to keep the styles whilst editing, kind of like a rich text editor? It currently开发者_开发知识库 changes to a plaintext editor but it would be nice if you could just press an edit butt

Is it possible to keep the styles whilst editing, kind of like a rich text editor? It currently开发者_开发知识库 changes to a plaintext editor but it would be nice if you could just press an edit button and it allows you to (truly) edit in-line


It is possible by styling elements via css properties like

.editable form,
.editable input {
    margin: inherit;
    padding: inherit;
    font: inherit;
    color: inherit;
    background: inherit;
    border: inherit
}

where editable class is a selector for Jeditable


NOTE: JEditable uses <button /> node instead of <input type="button" />, so for styling buttons via CSS you need:

.editable button
{
  /** style goes here **/
}
0

精彩评论

暂无评论...
验证码 换一张
取 消