Fixing netlify
This commit is contained in:
@@ -136,6 +136,11 @@ export class MarkdownWidget extends WidgetType {
|
||||
}
|
||||
|
||||
private attachListeners(div: HTMLElement, buttons?: CodeWidgetButton[]) {
|
||||
div.addEventListener("mousedown", (e) => {
|
||||
// CodeMirror overrides mousedown on parent elements to implement its own selection highlighting.
|
||||
// That's nice, but not for markdown widgets, so let's not propagate the event to CodeMirror here.
|
||||
e.stopPropagation();
|
||||
});
|
||||
// Override wiki links with local navigate (faster)
|
||||
div.querySelectorAll("a[data-ref]").forEach((el_) => {
|
||||
const el = el_ as HTMLElement;
|
||||
|
||||
@@ -42,7 +42,7 @@ export class CommandHook extends EventEmitter<CommandHookEvents>
|
||||
|
||||
throttledBuildAllCommands = throttle(() => {
|
||||
this.buildAllCommands().catch(console.error);
|
||||
}, 1000);
|
||||
}, 200);
|
||||
|
||||
async buildAllCommands() {
|
||||
this.editorCommands.clear();
|
||||
|
||||
@@ -410,6 +410,10 @@
|
||||
|
||||
.sb-markdown-widget {
|
||||
margin: 0 0 -4ch 0;
|
||||
|
||||
::selection {
|
||||
background-color: var(--editor-selection-background-color) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.sb-markdown-top-widget h1,
|
||||
|
||||
Reference in New Issue
Block a user