docs: widgets ref: don't open links in new tabs
This commit is contained in:
parent
411f5af4ce
commit
98696b56d9
3 changed files with 6 additions and 3 deletions
|
|
@ -91,7 +91,7 @@ module.exports = function editField(editor, widget, propName, defaultValue){
|
|||
}
|
||||
var lock,
|
||||
selectedWidgets = [...editor.selectedWidgets]
|
||||
|
||||
|
||||
var onChange = ()=>{
|
||||
|
||||
if (lock) return
|
||||
|
|
@ -207,6 +207,9 @@ module.exports = function editField(editor, widget, propName, defaultValue){
|
|||
var htmlHelp = Array.isArray(defaultValue.help) ? defaultValue.help.join('<br/><br/>').replace(/<br\/>-/g, '-') : defaultValue.help
|
||||
htmlHelp = htmlHelp ? html`<p class="help">${raw(htmlHelp.replace(/`([^`]*)`/g, '<code>$1</code>'))}</p>` : ''
|
||||
|
||||
DOM.each(htmlHelp, 'a', (el)=>{
|
||||
el.target = '_blank'
|
||||
})
|
||||
|
||||
var htmlError = error ? html`<p class="error">${error}</p>` : '',
|
||||
computedValue = propName !== 'tabs' && propName !== 'widgets' ? widget.getProp(propName) : ['...']
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class Widget extends EventEmitter {
|
|||
'Insert icons using the prefix ^ followed by the icon\'s name : ^play, ^pause, etc'
|
||||
]},
|
||||
color: {type: 'string', value: 'auto', help: 'Defines the widget\'s accent color (css variable `--custom-color`). Must be a valid CSS color. Set to "auto" to inherit from parent widget.'},
|
||||
css: {type: 'string', value: '', help: 'CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/css-tips/" target="_blank">documentation</a>.'},
|
||||
css: {type: 'string', value: '', help: 'CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/css-tips/">documentation</a>.'},
|
||||
|
||||
_value: 'value',
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class Keys extends Widget {
|
|||
keydown: {type: 'string', value: '', help: [
|
||||
'This property is evaluated each time the key combo is pressed and defines the widget\'s own value. Formulas are given extras variables in this context:',
|
||||
'- `key`: pressed key name (usefull for handling multiple keys with a single keys widget, lowercased when referencing a character key)',
|
||||
'- `code`: pressed key code name (<a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code#Code_values" target="_blank">full list</a>)',
|
||||
'- `code`: pressed key code name (<a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code#Code_values">full list</a>)',
|
||||
'- `ctrl`: control key state',
|
||||
'- `alt`: alt key state',
|
||||
'- `shift`: shift key state',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue