mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 20:42:43 +00:00 
			
		
		
		
	TextEditor: Add help documentation
This commit is contained in:
		
							parent
							
								
									20f53c7462
								
							
						
					
					
						commit
						aa8cb35b90
					
				
					 2 changed files with 31 additions and 0 deletions
				
			
		
							
								
								
									
										28
									
								
								Base/usr/share/man/man1/TextEditor.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								Base/usr/share/man/man1/TextEditor.md
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,28 @@ | ||||||
|  | ## Name | ||||||
|  | 
 | ||||||
|  | TextEditor - SerenityOS text editor | ||||||
|  | 
 | ||||||
|  | ## Synopsis | ||||||
|  | 
 | ||||||
|  | ```**sh | ||||||
|  | $ TextEditor [--preview-mode mode] [file] | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | ## Description | ||||||
|  | 
 | ||||||
|  | TextEditor is a text document editor for SerenityOS featuring a preview mode | ||||||
|  | which allows automatic live rendering of HTML and Markdown documents. | ||||||
|  | 
 | ||||||
|  | ## Options | ||||||
|  | 
 | ||||||
|  | * `--preview-mode mode`: Preview mode, one of 'none', 'html', 'markdown', 'auto' | ||||||
|  | 
 | ||||||
|  | ## Arguments: | ||||||
|  | 
 | ||||||
|  | * file: File to edit | ||||||
|  | 
 | ||||||
|  | ## Examples | ||||||
|  | 
 | ||||||
|  | ```sh | ||||||
|  | $ TextEditor /home/anon/Documents/emoji.txt | ||||||
|  | ``` | ||||||
|  | @ -488,6 +488,9 @@ TextEditorWidget::TextEditorWidget() | ||||||
|     syntax_menu.add_action(*m_shell_highlight); |     syntax_menu.add_action(*m_shell_highlight); | ||||||
| 
 | 
 | ||||||
|     auto& help_menu = menubar->add_menu("Help"); |     auto& help_menu = menubar->add_menu("Help"); | ||||||
|  |     help_menu.add_action(GUI::CommonActions::make_help_action([](auto&) { | ||||||
|  |         Desktop::Launcher::open(URL::create_with_file_protocol("/usr/share/man/man1/TextEditor.md"), "/bin/Help"); | ||||||
|  |     })); | ||||||
|     help_menu.add_action(GUI::CommonActions::make_about_action("Text Editor", GUI::Icon::default_icon("app-text-editor"), window())); |     help_menu.add_action(GUI::CommonActions::make_about_action("Text Editor", GUI::Icon::default_icon("app-text-editor"), window())); | ||||||
| 
 | 
 | ||||||
|     GUI::Application::the()->set_menubar(move(menubar)); |     GUI::Application::the()->set_menubar(move(menubar)); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brendan Coles
						Brendan Coles