Insert block to the document.
(
&mut self,
block: Block,
prev_id: Option<String>,
)
| 237 | |
| 238 | /// Insert block to the document. |
| 239 | pub fn insert_block( |
| 240 | &mut self, |
| 241 | block: Block, |
| 242 | prev_id: Option<String>, |
| 243 | ) -> Result<Block, CollabError> { |
| 244 | let mut txn = self.collab.transact_mut(); |
| 245 | self.body.insert_block(&mut txn, block, prev_id) |
| 246 | } |
| 247 | |
| 248 | pub fn delete_block(&mut self, block_id: &str) -> Result<(), CollabError> { |
| 249 | let mut txn = self.collab.transact_mut(); |