Skip to content

Commit

Permalink
improvements to revisionhistory.adoc
Browse files Browse the repository at this point in the history
  • Loading branch information
FarzadHayat committed Feb 13, 2024
1 parent c5a1bb1 commit 6cd60f2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ include::partial$commands/{plugincode}-cmds.adoc[]

== Events

The {{pluginname}} plugin provides the following events.
The {pluginname} plugin provides the following events.

include::partial$events/{plugincode}-events.adoc[]

== APIs

The {{pluginname}} plugin provides the following APIs.
The {pluginname} plugin provides the following APIs.

include::partial$plugin-apis/{plugincode}-apis.adoc[]

Expand Down
57 changes: 24 additions & 33 deletions modules/ROOT/pages/revisionhistory.adoc
Original file line number Diff line number Diff line change
@@ -1,45 +1,42 @@
= Revision History Plugin
:navtitle: Revision History
:description: A view that allows {productname} users to view historical snapshots of saved revisions of the document, giving them the option to select a previous version to replace the editors content.
:description_short: View containing historial snapshots of previous editor states.
:keywords: plugin, Revision History.
:keywords: plugin, Revision History, changes, history, track, restore.
:pluginname: Revision History
:plugincode: revisionhistory
:plugincategory: premium

include::partial$misc/admon-premium-plugin.adoc[]

include::partial$misc/admon-requires-6.4v.adoc[]

The {pluginname} Premium plugin enables the creation of complex, interactive templates using {productname}.

They can also be added to a {productname} instance by end-users selecting content in a {productname} document and saving the selection as a template via the {productname} user-interface.

IMPORTANT: This initial {pluginname} release does not support <insert-any-currently-not-supported-content-or-options>. To update a particular template; insert the template into an editor; make edits; select the, now edited, content; and then create a new template (using, for example, the *Tools > Save as Template…* menu item).
include::partial$misc/admon-requires-6.8v.adoc[]
// TODO: change to 7.0v when admonition is available

// TODO: Add an introduction. What does the plugin do? Why would I use this plugin? Keep it concise.

== Using the Revision History plugin

// TODO

=== Setup

// @ben what do we need to cover here
// TODO: @ben what do we need to cover here

=== How it works

// @ben placeholder to outline all the details.
// TODO: @ben placeholder to outline all the details.

=== What revision history handles

// Insert template that clearly identifies what is and what is not handled when using the plugin.
// TODO: Insert template that clearly identifies what is and what is not handled when using the plugin.

== Basic setup

To setup the {pluginname} plugin user-interface in the editor:

* add `{plugincode}` to the `plugins` option in the editor configuration;

* add `revisionhistory` to the `toolbar` option in the editor configuration;
* add `{plugincode}` to the `toolbar` option in the editor configuration;

For example:

Expand All @@ -49,45 +46,39 @@ tinymce.init({
selector: 'textarea', // change this value according to your html
plugins: 'revisionhistory',
toolbar: 'revisionhistory',
revisionhistory_fetch: fetch('/revisionhistory'), // change this value to your endpoint for fetching the revision history
});
----

NOTE: The undefined options in the above example must be defined. See the xref:options[Options] below for specific details on each function.


== Interactive examples

There are <num> approaches to using the Revision History Premium plugin: <options examples are?>.


[[insert-name]]
=== <insert-name>

////
include::partial$misc/admon-requires-6.8v.adoc[]
include::partial$misc/admon-requires-7.0v.adoc[] // @ben to confirm if we need to state 7.0 as its backward compatible.
////

// What is it?
// What does it do
== Interactive example

liveDemo::{plugincode}[]

[[options]]
== Options

The following configuration options affect the behavior of the {pluginname} plugin.

include::partial$configuration/revisionhistory_fetch.adoc[leveloffset=+1]
// include::partial$configuration/revisionhistory_fetch.adoc[][leveloffset=+1]

// include::partial$configuration/revisionhistory_css_url.adoc[][leveloffset=+1]

include::partial$configuration/revisionhistory_css_url.adoc[leveloffset=+1]
// include::partial$configuration/revisionhistory_diff_classes.adoc[][leveloffset=+1]

include::partial$configuration/revisionhistory_diff_classes.adoc[leveloffset=+1]
include::partial$misc/plugin-toolbar-button-id-boilerplate.adoc[]

include::partial$misc/plugin-menu-item-id-boilerplate.adoc[]

[[commands]]
== Commands

The {pluginname} plugin provides the following {productname} commands.

include::partial$commands/{plugincode}-cmds.adoc[]
include::partial$commands/{plugincode}-cmds.adoc[]

== Events

The {pluginname} plugin provides the following events.

include::partial$events/{plugincode}-events.adoc[]

0 comments on commit 6cd60f2

Please sign in to comment.