mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 02:26:04 +00:00
9d626f12e8
`MarkedString` is deprecated so it's a little confusing that we still use the type in a few places. Instead split out the non-deprecated `MarkdownString` type
22 lines
769 B
TypeScript
22 lines
769 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
import type { ActivationFunction } from 'vscode-notebook-renderer';
|
|
|
|
const activate: ActivationFunction = (_ctx) => {
|
|
return {
|
|
renderOutputItem: (item, element) => {
|
|
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
svg.setAttribute('viewBox', '0 0 300 100');
|
|
|
|
svg.innerHTML = item.text();
|
|
element.innerText = '';
|
|
|
|
element.appendChild(svg);
|
|
}
|
|
};
|
|
};
|
|
|
|
export { activate };
|