You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally, I was retrieving the data from the editor using this:
editor.getView().linesContent.children[3].children
where node [3] = div.view-lines
which gives a nicely structured list of tokens and data. However, my content got complicated enough that the content scrolled off of the view which is when I discovered it really only does give you what's in the view pane which wasn't obvious before. However, now I can't figure out how to get the data in the structured format for the non-visible portion of the editor. I've tried getModel and getView but it only comes back as raw text in those objects.
Thoughts?
The text was updated successfully, but these errors were encountered:
interface IModel {
...
/**
* Tokenize if necessary and get the tokenization result for the line `lineNumber`, as returned by the language mode.
* @internal
*/
getLineContext(lineNumber:number): ILineContext;
...
}
/**
* @internal
*/
export interface ILineContext {
getLineContent(): string;
modeTransitions: ModeTransition[];
getTokenCount(): number;
getTokenStartIndex(tokenIndex:number): number;
getTokenType(tokenIndex:number): string;
getTokenText(tokenIndex:number): string;
getTokenEndIndex(tokenIndex:number): number;
findIndexOfOffset(offset:number): number;
}
We are not ready to commit on the API shape in this area, that's why it is "hidden".
Originally, I was retrieving the data from the editor using this:
editor.getView().linesContent.children[3].children
where node [3] = div.view-lines
which gives a nicely structured list of tokens and data. However, my content got complicated enough that the content scrolled off of the view which is when I discovered it really only does give you what's in the view pane which wasn't obvious before. However, now I can't figure out how to get the data in the structured format for the non-visible portion of the editor. I've tried getModel and getView but it only comes back as raw text in those objects.
Thoughts?
The text was updated successfully, but these errors were encountered: