Markdown show up in full-text search results
This commit is contained in:
parent
0d329ac18a
commit
6c3ebfe36d
@ -54,7 +54,7 @@ export class MarkdownComponent extends EditorNodeContract implements OnInit {
|
||||
}
|
||||
|
||||
public writeChangesToNode(): void | Promise<void> {
|
||||
this.node.Value.Mode = 'code';
|
||||
this.node.Value.Mode = 'markdown';
|
||||
this.node.Value.Value = this.contents;
|
||||
this.node.value = this.contents;
|
||||
this.savedValue = this.contents;
|
||||
|
@ -42,6 +42,12 @@
|
||||
color: var(--noded-background-files);
|
||||
}
|
||||
}
|
||||
|
||||
&.markdown {
|
||||
.search-icon {
|
||||
color: var(--noded-background-markdown);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search-assoc {
|
||||
|
@ -59,19 +59,14 @@ export class SearchComponent implements OnInit {
|
||||
}
|
||||
|
||||
async openResult(result: SearchResult) {
|
||||
const nodeTypes = [
|
||||
'node', 'code', 'db', 'files', 'markdown',
|
||||
];
|
||||
|
||||
if ( result.type === 'page' ) {
|
||||
await this.router.navigate(['/editor', { id: result.id }]);
|
||||
await this.dismiss();
|
||||
} else if ( result.type === 'node' ) {
|
||||
await this.router.navigate(['/editor', { id: result.associated.id, node_id: result.id }]);
|
||||
await this.dismiss();
|
||||
} else if ( result.type === 'code' ) {
|
||||
await this.router.navigate(['/editor', { id: result.associated.id, node_id: result.id }]);
|
||||
await this.dismiss();
|
||||
} else if ( result.type === 'db' ) {
|
||||
await this.router.navigate(['/editor', { id: result.associated.id, node_id: result.id }]);
|
||||
await this.dismiss();
|
||||
} else if ( result.type === 'files' ) {
|
||||
} else if ( nodeTypes.includes(result.type) ) {
|
||||
await this.router.navigate(['/editor', { id: result.associated.id, node_id: result.id }]);
|
||||
await this.dismiss();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user