Skip to content

Commit a9dabf9

Browse files
committed
974850: Add documentation for custom data API
1 parent 65e97b5 commit a9dabf9

21 files changed

Lines changed: 253 additions & 0 deletions

File tree

44.9 KB
Loading

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

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,52 @@ 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+
RibbonService,
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: [RibbonService],
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.
44.9 KB
Loading

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

Lines changed: 23 additions & 0 deletions
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.
44.9 KB
Loading

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

Lines changed: 23 additions & 0 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.
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

Document-Processing/Word/Word-Processor/javascript-es5/track-changes.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,35 @@ container.documentEditor.selection.navigateNextRevision();
123123
*/
124124
container.documentEditor.selection.navigatePreviousRevision();
125125
```
126+
## Custom metadata along with author
127+
128+
The Document Editor provides options to customize revisions using [`revisionsettings`](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/documenteditorsettingsmodel#revisionsettings). The [`customData`](https://ej2.syncfusion.com/javascript/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/javascript/documentation/api/document-editor/revisionsettings#showcustomdatawithauthor) property.
129+
130+
The following example code illustrates how to enable and update custom metadata for track changes revisions.
131+
132+
```js
133+
var container = new ej.documenteditor.DocumentEditor({
134+
serviceUrl: hostUrl,
135+
height: '590px',
136+
enableTrackChanges: true,
137+
documentEditorSettings: {
138+
revisionSettings: {
139+
customData: 'Developer',
140+
showCustomDataWithAuthor: true
141+
}}
142+
});
143+
DocumentEditorContainer.Inject(Toolbar);
144+
container.appendTo('#container');
145+
146+
```
147+
148+
The Track Changes pane will display the author name along with the custom metadata, as shown in the screenshot below.
149+
150+
![Custom metadata along with author](images/track-changes-customData.png)
151+
152+
>Note:
153+
* 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.
154+
* Other than SFDT export (e.g. DOCX and other), the customData is not preserved, as it is specific to the Document Editor component.
126155

127156
## Filtering changes based on user
128157

0 commit comments

Comments
 (0)