| 
									
										
										
										
											2024-11-27 11:57:12 +01:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org> | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <LibWeb/Forward.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace Web::Editing { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | struct CommandDefinition { | 
					
						
							|  |  |  |     FlyString const& command; | 
					
						
							|  |  |  |     Function<bool(DOM::Document&, String const&)> action; | 
					
						
							|  |  |  |     Function<bool(DOM::Document const&)> indeterminate; | 
					
						
							|  |  |  |     Function<bool(DOM::Document const&)> state; | 
					
						
							|  |  |  |     Function<String(DOM::Document const&)> value; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Optional<CommandDefinition const&> find_command_definition(FlyString const&); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Command implementations
 | 
					
						
							| 
									
										
										
										
											2024-11-29 11:56:28 +01:00
										 |  |  | bool command_default_paragraph_separator_action(DOM::Document&, String const&); | 
					
						
							|  |  |  | String command_default_paragraph_separator_value(DOM::Document const&); | 
					
						
							| 
									
										
										
										
											2024-11-27 11:57:12 +01:00
										 |  |  | bool command_delete_action(DOM::Document&, String const&); | 
					
						
							| 
									
										
										
										
											2024-12-10 16:16:56 +01:00
										 |  |  | bool command_insert_linebreak_action(DOM::Document&, String const&); | 
					
						
							| 
									
										
										
										
											2024-12-03 16:29:21 +01:00
										 |  |  | bool command_insert_paragraph_action(DOM::Document&, String const&); | 
					
						
							| 
									
										
										
										
											2024-12-03 16:28:49 +01:00
										 |  |  | bool command_style_with_css_action(DOM::Document&, String const&); | 
					
						
							|  |  |  | bool command_style_with_css_state(DOM::Document const&); | 
					
						
							| 
									
										
										
										
											2024-11-27 11:57:12 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | } |