Fallback to binding example syntax for code-mirror popover plugin when no context exists
This commit is contained in:
parent
fa685962a8
commit
97375d1a33
|
@ -174,7 +174,7 @@
|
||||||
complete.push(
|
complete.push(
|
||||||
autocompletion({
|
autocompletion({
|
||||||
override: [...completions],
|
override: [...completions],
|
||||||
closeOnBlur: false,
|
closeOnBlur: true,
|
||||||
icons: false,
|
icons: false,
|
||||||
optionClass: () => "autocomplete-option",
|
optionClass: () => "autocomplete-option",
|
||||||
})
|
})
|
||||||
|
@ -462,7 +462,7 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
max-height: 480px;
|
max-height: 480px;
|
||||||
}
|
}
|
||||||
.code-editor :global(.binding__example.helper) {
|
.code-editor :global(.binding__example) {
|
||||||
color: var(--spectrum-global-color-blue-700);
|
color: var(--spectrum-global-color-blue-700);
|
||||||
}
|
}
|
||||||
.code-editor :global(.binding__example span) {
|
.code-editor :global(.binding__example span) {
|
||||||
|
|
|
@ -166,7 +166,7 @@ export const buildBindingInfoNode = (completion, binding) => {
|
||||||
const ele = document.createElement("div")
|
const ele = document.createElement("div")
|
||||||
ele.classList.add("info-bubble")
|
ele.classList.add("info-bubble")
|
||||||
|
|
||||||
if (binding.valueHTML) {
|
if (binding.value != null && binding.valueHTML) {
|
||||||
ele.innerHTML = `<div class="binding__example">${binding.valueHTML}</div>`
|
ele.innerHTML = `<div class="binding__example">${binding.valueHTML}</div>`
|
||||||
return ele
|
return ele
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue