Files
architype/EditorLabel.js

23 lines
433 B
JavaScript
Raw Permalink Normal View History

class EditorLabel extends EditorInputBase {
constructor(id, label) {
super(id, label);
2019-07-10 04:09:54 +00:00
this.elem_.classList.add('label');
this.input_.placeholder = 'label';
}
serialize() {
return super.serialize({
2019-07-10 04:09:54 +00:00
type: 'label',
});
2019-07-10 04:09:54 +00:00
}
static unserialize(ser) {
let label = new EditorLabel(ser.id);
2019-07-10 04:09:54 +00:00
label.setLabel(ser.label);
label.setHighlight(ser.highlight);
2019-07-10 04:09:54 +00:00
return label.getElement();
}
}