mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
TextEditor: Add live preview for HTML documents :^)
This allows you to edit HTML and see the changes live. This feature is possibly my favorite feature in the world right now.
This commit is contained in:
parent
8e6522d034
commit
85ac7dc1b1
2 changed files with 39 additions and 1 deletions
|
@ -45,12 +45,14 @@ public:
|
|||
GUI::TextEditor& editor() { return *m_editor; }
|
||||
|
||||
void set_markdown_preview_enabled(bool);
|
||||
void set_html_preview_enabled(bool);
|
||||
|
||||
private:
|
||||
TextEditorWidget();
|
||||
void set_path(const LexicalPath& file);
|
||||
void update_title();
|
||||
void update_markdown_preview();
|
||||
void update_html_preview();
|
||||
|
||||
virtual void drop_event(GUI::DropEvent&) override;
|
||||
|
||||
|
@ -64,13 +66,17 @@ private:
|
|||
RefPtr<GUI::Action> m_save_as_action;
|
||||
RefPtr<GUI::Action> m_find_replace_action;
|
||||
RefPtr<GUI::Action> m_line_wrapping_setting_action;
|
||||
RefPtr<GUI::Action> m_markdown_preview_action;
|
||||
|
||||
RefPtr<GUI::Action> m_find_next_action;
|
||||
RefPtr<GUI::Action> m_find_previous_action;
|
||||
RefPtr<GUI::Action> m_replace_next_action;
|
||||
RefPtr<GUI::Action> m_replace_previous_action;
|
||||
RefPtr<GUI::Action> m_replace_all_action;
|
||||
|
||||
GUI::ActionGroup m_preview_actions;
|
||||
RefPtr<GUI::Action> m_markdown_preview_action;
|
||||
RefPtr<GUI::Action> m_html_preview_action;
|
||||
|
||||
RefPtr<GUI::StatusBar> m_statusbar;
|
||||
|
||||
RefPtr<GUI::TextBox> m_find_textbox;
|
||||
|
@ -95,4 +101,5 @@ private:
|
|||
bool m_document_dirty { false };
|
||||
bool m_document_opening { false };
|
||||
bool m_markdown_preview_enabled { false };
|
||||
bool m_html_preview_enabled { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue