Markdown show up in full-text search results
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details

master
Garrett Mills 4 years ago
parent 0d329ac18a
commit 6c3ebfe36d
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

@ -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…
Cancel
Save