Skip to content

Commit 171a228

Browse files
Merge pull request #2001 from syncfusion-content/974850-CustomDD
974850: Custom metadata along with author
2 parents d211710 + 9463030 commit 171a228

23 files changed

Lines changed: 291 additions & 5 deletions

File tree

Document-Processing-toc.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2997,6 +2997,7 @@
29972997
<li><a href="/document-processing/word/word-processor/asp-net-mvc/table-format">Working with Table Formatting</a></li>
29982998
<li><a href="/document-processing/word/word-processor/asp-net-mvc/section-format">Working with Section Formatting</a></li>
29992999
<li><a href="/document-processing/word/word-processor/asp-net-mvc/comments">Comments</a></li>
3000+
<li><a href="/document-processing/word/word-processor/asp-net-mvc/track-changes">Track Changes</a></li>
30003001
<li><a href="/document-processing/word/word-processor/asp-net-mvc/fields">Fields</a></li>
30013002
<li><a href="/document-processing/word/word-processor/asp-net-mvc/form-fields">Form fields</a></li>
30023003
<li><a href="/document-processing/word/word-processor/asp-net-mvc/clipboard">Clipboard</a></li>
44.9 KB
Loading

Document-Processing/Word/Word-Processor/angular/track-changes.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,57 @@ In DocumentEditor, we have built-in review panel in which we have provided suppo
105105

106106
![Track changes](images/tracked-changes.png)
107107

108+
## Custom metadata along with author
109+
110+
The Document Editor provides options to customize revisions using [`revisionSettings`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/documenteditorsettingsmodel#revisionsettings). The [`customData`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/revisionsettings#customdata) property allows you to attach additional metadata to tracked revisions in the Word Processor. This metadata can represent roles, tags, or any custom identifier for the revision. To display this metadata along with the author name in the Track Changes pane, you must enable the [`showCustomDataWithAuthor`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/revisionsettings#showcustomdatawithauthor) property.
111+
112+
The following example code illustrates how to enable and update custom metadata for track changes revisions.
113+
114+
```ts
115+
import { Component, OnInit, ViewChild } from '@angular/core';
116+
import {
117+
ToolbarService,
118+
DocumentEditorContainerComponent,
119+
} from '@syncfusion/ej2-angular-documenteditor';
120+
import { DocumentEditorContainerModule } from '@syncfusion/ej2-angular-documenteditor';
121+
@Component({
122+
selector: 'app-container',
123+
standalone: true,
124+
imports: [DocumentEditorContainerModule],
125+
providers: [ToolbarService],
126+
template: `<ejs-documenteditorcontainer #documenteditor_default
127+
serviceUrl="hostUrl"
128+
height="600px"
129+
style="display:block"
130+
[enableTrackChanges]=true
131+
[documentEditorSettings]= "Settings" >
132+
</ejs-documenteditorcontainer>
133+
`,
134+
})
135+
export class AppComponent implements OnInit {
136+
@ViewChild('documenteditor_default')
137+
public container?: DocumentEditorContainerComponent;
138+
public Settings = {
139+
revisionSettings: {
140+
customData: 'Developer',
141+
showCustomDataWithAuthor: true,
142+
}};
143+
ngOnInit(): void {}
144+
}
145+
```
146+
The Track Changes pane will display the author name along with the custom metadata, as shown in the screenshot below.
147+
148+
![Custom metadata along with author](images/track-changes-customData.png)
149+
150+
>Note:
151+
* When you export the document as SFDT, the customData value is stored in the revision collection. When you reopen the SFDT, the custom data is automatically restored and displayed in the Track Changes pane.
152+
* Other than SFDT export (e.g. DOCX and other), the customData is not preserved, as it is specific to the Document Editor component.
153+
108154
## Protect the document in track changes only mode
109155

110156
Document Editor provides support for protecting the document with `RevisionsOnly` protection. In this protection, all the users are allowed to view the document and do their corrections, but they cannot accept or reject any tracked changes in the document. Later, the author can view their corrections and accept or reject the changes.
111157

112-
Document editor provides an option to protect and unprotect document using [`enforceProtection`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/editor/#enforceprotection) and [`stopProtection`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/editor/#stopprotection) API.
158+
Document editor provides an option to protect and unprotect document using [`enforceProtection`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/editor#enforceprotection) and [`stopProtection`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/editor#stopprotection) API.
113159

114160
The following example code illustrates how to enforce and stop protection in Document editor container.
115161

44.9 KB
Loading

Document-Processing/Word/Word-Processor/asp-net-core/track-changes.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,29 @@ In DocumentEditor, we have built-in review panel in which we have provided suppo
129129

130130
![Track changes](images/track-changes.png)
131131

132+
## Custom metadata along with author
133+
134+
The Document Editor provides options to customize revisions using `revisionSettings`. The `customData` property allows you to attach additional metadata to tracked revisions in the Word Processor. This metadata can represent roles, tags, or any custom identifier for the revision. To display this metadata along with the author name in the Track Changes pane, you must enable the `showCustomDataWithAuthor` property.
135+
136+
The following example code illustrates how to enable and update custom metadata for track changes revisions.
137+
138+
{% tabs %}
139+
{% highlight cshtml tabtitle="CSHTML" %}
140+
{% include code-snippet/document-editor/asp-net-core/document-editor-container/track-changes-revisionSettings/tagHelper %}
141+
{% endhighlight %}
142+
{% highlight c# tabtitle="Track-changes-only.cs" %}
143+
{% include code-snippet/document-editor/asp-net-core/document-editor-container/track-changes-revisionSettings/document-editor.cs %}
144+
{% endhighlight %}
145+
{% endtabs %}
146+
147+
The Track Changes pane will display the author name along with the custom metadata, as shown in the screenshot below.
148+
149+
![Custom metadata along with author](images/track-changes-customData.png)
150+
151+
>Note:
152+
* When you export the document as SFDT, the customData value is stored in the revision collection. When you reopen the SFDT, the custom data is automatically restored and displayed in the Track Changes pane.
153+
* Other than SFDT export (e.g. DOCX and other), the customData is not preserved, as it is specific to the Document Editor component.
154+
132155
## Protect the document in track changes only mode
133156

134157
Document Editor provides support for protecting the document with `RevisionsOnly` protection. In this protection, all the users are allowed to view the document and do their corrections, but they cannot accept or reject any tracked changes in the document. Later, the author can view their corrections and accept or reject the changes.
@@ -152,4 +175,4 @@ Tracked changes only protection can be enabled in UI by using [Restrict Editing
152175

153176
![Enable track changes only protection](images/tracked-changes.png)
154177

155-
N> In enforce Protection method, first parameter denotes password and second parameter denotes protection type. Possible values of protection type are `NoProtection |ReadOnly |FormFieldsOnly |CommentsOnly |RevisionsOnly`. In stop protection method, parameter denotes the password.
178+
N> In enforce Protection method, first parameter denotes password and second parameter denotes protection type. Possible values of protection type are `NoProtection |ReadOnly |FormFieldsOnly |CommentsOnly |RevisionsOnly`. In stop protection method, parameter denotes the password.
44.9 KB
Loading

Document-Processing/Word/Word-Processor/asp-net-mvc/track-changes.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,29 @@ In DocumentEditor, we have built-in review panel in which we have provided suppo
124124

125125
![Track changes](images/track-changes.png)
126126

127+
## Custom metadata along with author
128+
129+
The Document Editor provides options to customize revisions using `revisionSettings`. The `customData` property allows you to attach additional metadata to tracked revisions in the Word Processor. This metadata can represent roles, tags, or any custom identifier for the revision. To display this metadata along with the author name in the Track Changes pane, you must enable the `showCustomDataWithAuthor` property.
130+
131+
The following example code illustrates how to enable and update custom metadata for track changes revisions.
132+
133+
{% tabs %}
134+
{% highlight razor tabtitle="CSHTML" %}
135+
{% include code-snippet/document-editor/asp-net-mvc/document-editor-container/track-changes-revisionSettings/razor %}
136+
{% endhighlight %}
137+
{% highlight c# tabtitle="Track-changes.cs" %}
138+
{% include code-snippet/document-editor/asp-net-mvc/document-editor-container/track-changes-revisionSettings/document-editor.cs %}
139+
{% endhighlight %}
140+
{% endtabs %}
141+
142+
The Track Changes pane will display the author name along with the custom metadata, as shown in the screenshot below.
143+
144+
![Custom metadata along with author](images/track-changes-customData.png)
145+
146+
>Note:
147+
* When you export the document as SFDT, the customData value is stored in the revision collection. When you reopen the SFDT, the custom data is automatically restored and displayed in the Track Changes pane.
148+
* Other than SFDT export (e.g. DOCX and other), the customData is not preserved, as it is specific to the Document Editor component.
149+
127150
## Protect the document in track changes only mode
128151

129152
Document Editor provides support for protecting the document with `RevisionsOnly` protection. In this protection, all the users are allowed to view the document and do their corrections, but they cannot accept or reject any tracked changes in the document. Later, the author can view their corrections and accept or reject the changes.
@@ -142,8 +165,8 @@ The following example code illustrates how to enforce and stop protection in Doc
142165
{% endhighlight %}
143166
{% endtabs %}
144167

145-
Tracked changes only protection can be enabled in UI by using [Restrict Editing pane](./document-management#restrict-editing-pane/)
168+
Tracked changes only protection can be enabled in UI by using [Restrict Editing pane](./document-management#restrict-editing-pane)
146169

147170
![Enable track changes only protection](images/tracked-changes.png)
148171

149-
N> In enforce Protection method, first parameter denotes password and second parameter denotes protection type. Possible values of protection type are `NoProtection |ReadOnly |FormFieldsOnly |CommentsOnly |RevisionsOnly`. In stop protection method, parameter denotes the password.
172+
N> In enforce Protection method, first parameter denotes password and second parameter denotes protection type. Possible values of protection type are `NoProtection |ReadOnly |FormFieldsOnly |CommentsOnly |RevisionsOnly`. In stop protection method, parameter denotes the password.
44.9 KB
Loading

Document-Processing/Word/Word-Processor/blazor/track-changes.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,32 @@ In DocumentEditor, we have built-in review panel in which we have provided suppo
8585

8686
![Track changes in Blazor DocumentEditor](images/track-changes.png)
8787

88+
## Custom metadata along with author
89+
90+
The Document Editor provides options to customize revisions using [`RevisionSettings`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.DocumentEditorSettingsModel.html#Syncfusion_Blazor_DocumentEditor_DocumentEditorSettingsModel_RevisionSettings). The `CustomData` property allows you to attach additional metadata to tracked revisions in the Word Processor. This metadata can represent roles, tags, or any custom identifier for the revision. To display this metadata along with the author name in the Track Changes pane, you must enable the `ShowCustomDataWithAuthor` property.
91+
92+
The following example code illustrates how to enable and update custom metadata for track changes revisions.
93+
94+
```ts
95+
@using Syncfusion.Blazor.DocumentEditor
96+
97+
<SfDocumentEditorContainer @ref="container" Height="590px" DocumentEditorSettings="@settings" EnableTrackChanges="true"></SfDocumentEditorContainer>
98+
99+
@code {
100+
SfDocumentEditorContainer container;
101+
DocumentEditorSettingsModel settings = new DocumentEditorSettingsModel()
102+
{ RevisionSettings= { CustomData = "Developer", ShowCustomDataWithAuthor = true}};
103+
}
104+
```
105+
106+
The Track Changes pane will display the author name along with the custom metadata, as shown in the screenshot below.
107+
108+
![Custom metadata along with author](images/track-changes-customData.png)
109+
110+
>Note:
111+
* When you export the document as SFDT, the customData value is stored in the revision collection. When you reopen the SFDT, the custom data is automatically restored and displayed in the Track Changes pane.
112+
* Other than SFDT export (e.g. DOCX and other), the customData is not preserved, as it is specific to the Document Editor component.
113+
88114
## Protect the document in track changes only mode
89115

90116
Document Editor provides support for protecting the document with `RevisionsOnly` protection. In this protection, all the users are allowed to view the document and do their corrections, but they cannot accept or reject any tracked changes in the document. Later, the author can view their corrections and accept or reject the changes.
44.9 KB
Loading

0 commit comments

Comments
 (0)