mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-30 01:25:38 -05:00
Improve find by tracking actual rendered text (#9419)
* Improve find by tracking actual rendered text * Fix tests, add notebook md render
This commit is contained in:
@@ -200,6 +200,7 @@ export class TextCellComponent extends CellView implements OnInit, OnChanges {
|
||||
this.setLoading(false);
|
||||
let outputElement = <HTMLElement>this.output.nativeElement;
|
||||
outputElement.innerHTML = this.markdownResult.element.innerHTML;
|
||||
this.cellModel.renderedOutputTextContent = this.getRenderedTextOutput();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,4 +332,17 @@ export class TextCellComponent extends CellView implements OnInit, OnChanges {
|
||||
}
|
||||
return children;
|
||||
}
|
||||
|
||||
private getRenderedTextOutput(): string[] {
|
||||
let textOutput: string[] = [];
|
||||
let elements = this.getHtmlElements();
|
||||
elements.forEach(element => {
|
||||
if (element && element.innerText) {
|
||||
textOutput.push(element.innerText);
|
||||
} else {
|
||||
textOutput.push('');
|
||||
}
|
||||
});
|
||||
return textOutput;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user