mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 09:46:04 -05:00
TextEditor: Use Web::PageView::load_html() for the markdown preview
This commit is contained in:
parent
1c54272b41
commit
1f97897b40
Notes:
sideshowbarker
2024-07-19 05:27:52 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1f97897b408
1 changed files with 1 additions and 3 deletions
|
@ -52,7 +52,6 @@
|
|||
#include <LibGfx/Font.h>
|
||||
#include <LibMarkdown/Document.h>
|
||||
#include <LibWeb/PageView.h>
|
||||
#include <LibWeb/Parser/HTMLParser.h>
|
||||
#include <string.h>
|
||||
|
||||
TextEditorWidget::TextEditorWidget()
|
||||
|
@ -563,7 +562,6 @@ void TextEditorWidget::update_markdown_preview()
|
|||
auto document = Markdown::Document::parse(m_editor->text());
|
||||
if (document) {
|
||||
auto html = document->render_to_html();
|
||||
auto html_document = Web::parse_html_document(html, URL::create_with_file_protocol(m_path));
|
||||
m_page_view->set_document(html_document);
|
||||
m_page_view->load_html(html, URL::create_with_file_protocol(m_path));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue