Skip to content

Commit ced4230

Browse files
author
Sorita Heng
committed
Initial setup
1 parent 80d35b4 commit ced4230

File tree

11 files changed

+217
-1
lines changed

11 files changed

+217
-1
lines changed

modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@
377377
***** xref:tinydrive-pick.adoc[The Pick API]
378378
***** xref:tinydrive-type-interfaces.adoc[TypeScript interfaces]
379379
**** xref:tinydrive-changelog.adoc[Changelog]
380+
*** xref:trackchanges.adoc[Track Changes]
380381
** Open source plugins
381382
*** xref:accordion.adoc[Accordion]
382383
*** xref:anchor.adoc[Anchor]
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
= Track Changes Plugin
2+
:navtitle: Track Changes
3+
:description: A view that allows users to review document changes made by multiple authors
4+
:description_short: A view of tracked changes made by multiple authors
5+
:keywords: plugin, Track Changes, changes, diff
6+
:pluginname: Track Changes
7+
:plugincode: trackchanges
8+
:plugincategory: premium
9+
10+
include::partial$misc/admon-revisionhistory-paid-addon-pricing.adoc[]
11+
12+
include::partial$misc/admon-requires-8.0v.adoc[]
13+
14+
The Track Changes plugin allows users to easily review and manage changes made to a document by multiple authors.
15+
16+
== Interactive example
17+
18+
== How it works
19+
20+
== Basic setup
21+
22+
To setup the {pluginname} plugin in the editor:
23+
24+
* add `{plugincode}` to the `plugins` option in the editor configuration;
25+
* add `{plugincode}` to the `toolbar` option in the editor configuration;
26+
27+
For example:
28+
29+
[source,js]
30+
----
31+
tinymce.init({
32+
selector: 'textarea', // change this value according to your HTML
33+
plugins: 'trackchanges',
34+
toolbar: 'trackchanges',
35+
// track changes options
36+
});
37+
----
38+
39+
== Data structure
40+
41+
== Options
42+
43+
The following configuration options affect the behavior of the {pluginname} plugin.
44+
45+
include::partial$configuration/trackchanges-options.adoc[]
46+
47+
include::partial$misc/plugin-toolbar-button-id-boilerplate.adoc[]
48+
49+
include::partial$misc/plugin-menu-item-id-boilerplate.adoc[]
50+
51+
== Commands
52+
53+
The {pluginname} plugin provides the following {productname} commands.
54+
55+
include::partial$commands/{plugincode}-cmds.adoc[]
56+
57+
== Events
58+
59+
The {pluginname} plugin provides the following events.
60+
61+
include::partial$events/{plugincode}-events.adoc[]
62+
63+
== APIs
64+
65+
The {pluginname} plugin provide the following APIs.
66+
67+
include::partial$plugin-apis/{plugincode}-apis.adoc[]
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[cols="1,3",options="header"]
2+
|===
3+
|Command |Description
4+
5+
|<mceCommandOne> |<Description one.>
6+
// Boilerplate for commands that require further documentation
7+
|<mceCommandTwo> |Description two. For details, see xref:using-<mcecommandtwo>[Using `+<mceCommandTwo>+`].
8+
|===
9+
10+
.Examples
11+
[source,js]
12+
----
13+
tinymce.activeEditor.execCommand('<mceCommandOne>');
14+
tinymce.activeEditor.execCommand('<mceCommandTwo>', <true|false>, { <key1>: '<value1>', <key2>: '<number>' });
15+
----
16+
17+
// Boilerplate for further documentation of commands that require it.
18+
[[using-<mcecommandtwo>]]
19+
== Using `+<mceCommandTwo>+`
20+
21+
`+<mceCommandTwo>+` accepts an object with the following key-value pairs:
22+
23+
[cols="1,,1,2",options="header"]
24+
|===
25+
|Name |Value |Requirement |Description
26+
27+
|<key1> |`+'<value1>'+` or `+'<value2>'+` |<Not r|R>equired |<Key-value description one.>
28+
|<key2> |`+<number>+` |<Not r|R>equired |<Key-value description two.>
29+
|===
30+
31+
// Further notes as required. Delete this comment once notes are added or if they are not required.
32+
33+
// Remove all comment lines and comment blocks before publishing.

modules/ROOT/partials/configuration/defaultmenuitems.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ tinymce.init({
55
menu: {
66
file: { title: 'File', items: 'newdocument restoredraft | preview | importword exportpdf exportword | print | deleteallconversations' },
77
edit: { title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall | searchreplace' },
8-
view: { title: 'View', items: 'code revisionhistory | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments' },
8+
view: { title: 'View', items: 'code revisionhistory trackchanges | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments' },
99
insert: { title: 'Insert', items: 'image link media addcomment pageembed codesample inserttable | math | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents | insertdatetime' },
1010
format: { title: 'Format', items: 'bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat' },
1111
tools: { title: 'Tools', items: 'spellchecker spellcheckerlanguage | a11ycheck code wordcount' },
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
[[<configuration_option>]]
2+
== `<configuration_option>`
3+
4+
////
5+
What does the option do?
6+
Why use it?
7+
When use it?
8+
What values can it use?
9+
What do these values do?
10+
Are there risks?
11+
- Explain without using ‘risk’ or similar words.
12+
- Use NOTE or IMPORTANT admonitions if helpful.
13+
- For longer or more complicated scenarios, use the limitations section below.
14+
////
15+
16+
*Type:* `+String+`, `+Boolean+`, `+Number+`, `+Function+`, `+Object+`, `+Array+`, or `+Regexp+`
17+
18+
// Remove the *Possible values* line if there is no discrete set of possible values.
19+
*Possible values:* `'string1'`, `'string2'`, `false`
20+
21+
*Default value:* `false`, `1`, `'string1'`
22+
23+
=== Example: using `<configuration_option>`
24+
25+
// Add a working and tested configuration.
26+
[source,js]
27+
----
28+
tinymce.init({
29+
selector: 'textarea', // Change this value according to your HTML
30+
<configuration_option>: '<value>'
31+
});
32+
----
33+
34+
// Add a working and tested configuration (edit as required)
35+
// or remove if not applicable.
36+
=== Example: disabling the <feature>
37+
38+
To disable <feature>, set `<configuration_option>` to `false`.
39+
40+
[source,js]
41+
----
42+
tinymce.init({
43+
selector: 'textarea', // Change this value according to your HTML
44+
<configuration_option>: 'false'
45+
});
46+
----
47+
48+
// Remove if not applicable.
49+
=== Limitation<s> of the `<configuration_option>` option
50+
51+
The `<configuration_option>` option has the following limitations.
52+
53+
////
54+
Known limitations.
55+
Complicated scenarios.
56+
Anything that warrants a CAUTION or WARNING admonition.
57+
////
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
The following events are provided by the xref:{plugincode}.adoc[{pluginname} plugin].
2+
3+
[cols="1,1,2",options="header"]
4+
|===
5+
|Name |Data |Description
6+
|EventOne |`+{ <key1>: <value1> }+` |Fired when event one description.
7+
|EventTwo |`+{ <key2>: <value2>, <key3>: <value3> }+` |Fired when event two description.
8+
|EventThree |N/A |Fired when event three description.
9+
// Markup to add a ‘requires this version of TinyMCE’ admonition into its own row
10+
// immediately above the event requiring such a notice.
11+
// If not needed, remove the markup and this comment.
12+
// If needed, edit the file-name and remove this comment.
13+
3+|
14+
//include::partial$misc/admon-requires-<version.version>v.adoc[]
15+
|EventFour |`+{ <key6>: <value6> }+` |Fired when the event seven description.
16+
|EventEn |`+{ <key4>: <value4>, <key5>: <value5> }+` |Fired when event en description.
17+
|===

modules/ROOT/partials/index-pages/premium-plugins.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,12 @@ Cloud-based file and image management for {productname}.
201201
// odd.
202202
// 2. Prepend the inline comment markup to this element
203203
// when the number of cells in the table is even.
204+
204205
a|
206+
[.lead]
207+
xref:trackchanges.adoc[Track Changes]
208+
209+
Review document changes by multiple users.
205210

206211
|===
207212

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[cols="1,1,2",options="header"]
2+
|===
3+
|Menu item identifier |xref:menus-configuration-options.adoc#example-the-tinymce-default-menu-items[Default Menu Location] |Description
4+
5+
|`trackchanges` |View |Opens the Track Changes view.
6+
|===
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NOTE: This feature is only available for {productname} 8.0 and later.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[cols="1,1,4",options="header"]
2+
|===
3+
|Name |Arguments |Description
4+
5+
|<api1> |<arguments1> |<What api1 does>
6+
// Markup to add a ‘requires this version of TinyMCE’ admonition into its own row
7+
// immediately above the event requiring such a notice.
8+
// If not needed, remove the markup and this comment.
9+
// If needed, edit the file-name and remove this comment.
10+
3+|
11+
//include::partial$misc/admon-requires-<version.version>v.adoc[]
12+
|<api2> |<arguments2> |<What api2 does>
13+
|===
14+
15+
.Examples
16+
[source,js]
17+
----
18+
// what this example does
19+
tinymce.activeEditor.plugins.<plugincode>.<api1>(<arguments1>);
20+
21+
// what this example does
22+
tinymce.activeEditor.plugins.<plugincode>.<api2>(<arguments2>);
23+
----

0 commit comments

Comments
 (0)