(editor: BlockNoteEditor<any, any, any>)
| 128 | ); |
| 129 | |
| 130 | export const insertAlert = (editor: BlockNoteEditor<any, any, any>) => ({ |
| 131 | title: "Insert Alert", |
| 132 | onItemClick: () => { |
| 133 | const block: PartialBlock< |
| 134 | BlockSchemaWithBlock<"alert", (typeof Alert)["config"]>, |
| 135 | any, |
| 136 | any |
| 137 | > = { |
| 138 | type: "alert", |
| 139 | }; |
| 140 | |
| 141 | editor.insertBlocks([block], editor.getTextCursorPosition().block, "after"); |
| 142 | }, |
| 143 | subtext: "Insert an alert block to emphasize text", |
| 144 | icon: <RiAlertFill />, |
| 145 | aliases: [ |
| 146 | "alert", |
| 147 | "notification", |
| 148 | "emphasize", |
| 149 | "warning", |
| 150 | "error", |
| 151 | "info", |
| 152 | "success", |
| 153 | ], |
| 154 | group: "Other", |
| 155 | }); |
no test coverage detected