editor: reallow editing disabled properties
This commit is contained in:
parent
e478ed7816
commit
9527359a7c
3 changed files with 5 additions and 7 deletions
|
|
@ -22,7 +22,7 @@ module.exports = function editField(editor, widget, propName, defaultValue){
|
|||
|
||||
if (widget.props.type == 'tab' || widget.props.type == 'root') return
|
||||
|
||||
input = DOM.create(`<select class="input" title="${propName}" ${disabled ? 'disabled' : ''}/>`)
|
||||
input = DOM.create(`<select class="input" title="${propName}"/>`)
|
||||
|
||||
for (let category in widgetCategories) {
|
||||
input.innerHTML += `<optgroup label="> ${category}">`
|
||||
|
|
@ -42,7 +42,7 @@ module.exports = function editField(editor, widget, propName, defaultValue){
|
|||
var value = typeof widget.props[propName] !== 'string' ?
|
||||
JSON.stringify(widget.props[propName], null, ' ').replace(/\n\s\s\s\s/g, ' ').replace(/\n\s\s(\}|\])/g, ' $1') : widget.props[propName]
|
||||
|
||||
input = DOM.create(`<textarea class="input" title="${propName}" rows="${value.split('\n').length}" ${disabled ? 'disabled' : ''}>${value}</textarea>`)
|
||||
input = DOM.create(`<textarea class="input" title="${propName}" rows="${value.split('\n').length}">${value}</textarea>`)
|
||||
|
||||
DOM.addEventListener(input, ['input', 'focus'], ()=>{
|
||||
input.setAttribute('rows',0)
|
||||
|
|
|
|||
|
|
@ -58,10 +58,6 @@
|
|||
label {
|
||||
color: var(--color-text-fade);
|
||||
}
|
||||
label + * {
|
||||
pointer-events: none;
|
||||
opacity: .75;
|
||||
}
|
||||
}
|
||||
label {
|
||||
background: var(--color-fg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue