mod.rs 927 B

1234567891011121314151617181920212223242526272829
  1. use crate::core::extensions::InsertExt;
  2. pub use auto_exit_block::*;
  3. pub use auto_format::*;
  4. pub use default_insert::*;
  5. use lib_ot::core::Delta;
  6. pub use preserve_block_format::*;
  7. pub use preserve_inline_format::*;
  8. pub use reset_format_on_new_line::*;
  9. mod auto_exit_block;
  10. mod auto_format;
  11. mod default_insert;
  12. mod preserve_block_format;
  13. mod preserve_inline_format;
  14. mod reset_format_on_new_line;
  15. pub struct InsertEmbedsExt {}
  16. impl InsertExt for InsertEmbedsExt {
  17. fn ext_name(&self) -> &str { "InsertEmbedsExt" }
  18. fn apply(&self, _delta: &Delta, _replace_len: usize, _text: &str, _index: usize) -> Option<Delta> { None }
  19. }
  20. pub struct ForceNewlineForInsertsAroundEmbedExt {}
  21. impl InsertExt for ForceNewlineForInsertsAroundEmbedExt {
  22. fn ext_name(&self) -> &str { "ForceNewlineForInsertsAroundEmbedExt" }
  23. fn apply(&self, _delta: &Delta, _replace_len: usize, _text: &str, _index: usize) -> Option<Delta> { None }
  24. }