diff --git a/docling_core/types/doc/document.py b/docling_core/types/doc/document.py index d950ac9c..380a127a 100644 --- a/docling_core/types/doc/document.py +++ b/docling_core/types/doc/document.py @@ -1977,6 +1977,7 @@ class TextItem(DocItem): formatting: Optional[Formatting] = None hyperlink: Optional[Union[AnyUrl, Path]] = Field(union_mode="left_to_right", default=None) + change_type: Optional[typing.Literal["inserted", "deleted"]] = None @deprecated("Use export_to_doctags() instead.") def export_to_document_tokens(self, *args, **kwargs): @@ -4210,6 +4211,7 @@ def add_text( hyperlink: Optional[Union[AnyUrl, Path]] = None, *, source: Optional[SourceType] = None, + change_type: Optional[typing.Literal["inserted", "deleted"]] = None, **kwargs: Any, ): """add_text. @@ -4317,6 +4319,7 @@ def add_text( parent=parent.get_ref(), formatting=formatting, hyperlink=hyperlink, + change_type=change_type, ) if prov: text_item.prov.append(prov)