UI: Fixed scrolling markdown source code module

This commit is contained in:
Artem Dzhereleiko 2025-03-31 11:32:23 +03:00
parent 8baa86b1dc
commit 252e6da744

View File

@ -141,7 +141,7 @@ export const loadModuleMarkdownSourceCode = (http: HttpClient, translate: Transl
let sourceCode = `<div class="flex flex-col !pl-4"><h6>${resource.title}</h6><small>${translate.instant('js-func.source-code')}</small></div>\n\n`; let sourceCode = `<div class="flex flex-col !pl-4"><h6>${resource.title}</h6><small>${translate.instant('js-func.source-code')}</small></div>\n\n`;
return loadFunctionModuleSource(http, resource.link).pipe( return loadFunctionModuleSource(http, resource.link).pipe(
map((source) => { map((source) => {
sourceCode += '```javascript\n{:code-style="margin-left: -16px; margin-right: -16px;"}\n' + source + '\n```'; sourceCode += '```javascript\n{:code-style="margin-left: -16px; margin-right: -16px; max-height: 65vh;"}\n' + source + '\n```';
return sourceCode; return sourceCode;
}), }),
catchError(err => { catchError(err => {