1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

HackStudio: Insert tooltip styling directly into Markdown HTML output

This commit is contained in:
Sam Atkins 2022-09-27 11:40:14 +01:00 committed by Linus Groh
parent 36c5dd78b1
commit 454bf1fde0

View file

@ -218,14 +218,7 @@ void Editor::show_documentation_tooltip_if_available(String const& hovered_token
return;
}
StringBuilder html;
// FIXME: With the InProcessWebView we used to manipulate the document body directly,
// With OutOfProcessWebView this isn't possible (at the moment). The ideal solution
// is probably to tweak Markdown::Document::render_to_html() so we can inject styles
// into the rendered HTML easily.
html.append(man_document->render_to_html());
html.append("<style>body { background-color: #dac7b5; }</style>"sv);
m_documentation_page_view->load_html(html.build(), {});
m_documentation_page_view->load_html(man_document->render_to_html("<style>body { background-color: #dac7b5; }</style>"sv), {});
m_documentation_tooltip_window->move_to(screen_location.translated(4, 4));
m_documentation_tooltip_window->show();