props/docs: fix some props and tweak help formatting
This commit is contained in:
parent
289b6ed54d
commit
51293dc0d8
4 changed files with 15 additions and 4 deletions
|
|
@ -184,7 +184,7 @@ module.exports = function editField(editor, widget, propName, defaultValue){
|
|||
var label = DOM.get(field, 'label')[0]
|
||||
label.addEventListener('fast-click', ()=>{
|
||||
|
||||
var htmlHelp = Array.isArray(defaultValue.help) ? defaultValue.help.join('<br/>') : defaultValue.help
|
||||
var htmlHelp = Array.isArray(defaultValue.help) ? defaultValue.help.join('<br/><br/>').replace(/<br\/>-/g, '-') : defaultValue.help
|
||||
htmlHelp = htmlHelp ? '<p class="help">' + htmlHelp.replace(/`([^`]*)`/g, '<code>$1</code>') + '</p>' : ''
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,18 @@ class Frame extends Widget {
|
|||
|
||||
border: {type: 'boolean', value: true, help: 'Set to `false` to disable the borders and background-color'},
|
||||
|
||||
}, ['color', 'target', 'precision', 'bypass'], {})
|
||||
}, ['color', 'target', 'precision', 'bypass'], {
|
||||
|
||||
label: {type: 'string|boolean', value: 'auto', help: [
|
||||
'Set to `false` to hide completely',
|
||||
'Insert icons using the prefix ^ followed by the icon\'s name : ^play, ^pause, etc',
|
||||
'If set to `false`, all pointer-events will be disabled on the frame as long as the editor is enabled to ensure it can be selected'
|
||||
]},
|
||||
value: {type: 'string', value: '', help: [
|
||||
'External web page URL. Only local URLs are allowed (starting with `http://127.0.0.1/`, `http://10.x.x.x/`, `http://192.168.x.x/`, etc)',
|
||||
]}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ module.exports = class Plot extends _plots_base {
|
|||
|
||||
}, ['target', 'precision', 'bypass'], {
|
||||
|
||||
value: {type: 'array|string', help: [
|
||||
value: {type: 'array|string', value: '', help: [
|
||||
'- `Array` of `y` values',
|
||||
'- `Array` of `[x, y]` `array` values',
|
||||
'- `String` `array`',
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ module.exports = class Rbgled extends Widget {
|
|||
|
||||
return super.defaults({}, ['color', 'target', 'precision', 'bypass'], {
|
||||
|
||||
value: {type: 'array|string', help: [
|
||||
value: {type: 'array|string', value: '', help: [
|
||||
'- `Array`: `[r, g, b]` (`r`, `g` and `b` between `0` and `255`)',
|
||||
'- `Array`: `[r, g, b, alpha]` (`alpha` between `0` and `255`)',
|
||||
'- `String`: CSS color',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue