Skip to content

Commit 3f55abd

Browse files
authored
DOC-3264: New feature documentation for fullpagehtml. (#3827)
* DOC-3264: New feature documentation for fullpagehtml. * DOC-3209: Update plugin name, file-names and improve examples. * DOC-3209: Update example to be more generic. * DOC-3209: Add release note entry for fullpagehtml. * DOC-3209: Updated live-demo and fix incorrect file name causing demo to fail. * DOC-3209: add missing icon and remove old legacy icon. * DOC-2309: Add links to xss_sanitization and valid_elements explaining some meta tags could be removed by default. * Update modules/ROOT/pages/fullpagehtml.adoc * Update modules/ROOT/pages/fullpagehtml.adoc * Update antora.yml * DOC-3254: Add known issue and plugin incompatibility issues with Suggested Edits and Revision History. * Update modules/ROOT/pages/fullpagehtml.adoc * DOC-3264: Copy edits and fixing visual blocks. * DOC-3264: Fix syntax rendering issue. * Update modules/ROOT/pages/fullpagehtml.adoc
1 parent 2f0835d commit 3f55abd

21 files changed

+358
-18
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<textarea id="fullpagehtml">
2+
<h1>Welcome to Full Page HTML Editing</h1>
3+
<p>This demo demonstrates the capabilities of the <span class="highlight">Full Page HTML plugin</span>. You can:</p>
4+
<ul>
5+
<li>Edit document metadata including title, description, and keywords by clicking the <strong>Full Page HTML</strong> button in the toolbar</li>
6+
<li>Modify HTML document structure and DOCTYPE</li>
7+
<li>Customize body styles and document properties</li>
8+
<li>View and edit the complete HTML structure in source code view or preview plugin under <strong>File</strong> in the menubar</li>
9+
</ul>
10+
<h2>Getting Started</h2>
11+
<p>Click the <strong>Full Page HTML</strong> button in the toolbar to open the document properties dialog. From there, you can modify:</p>
12+
<ul>
13+
<li><strong>Document Title:</strong> Change the page title that appears in browser tabs</li>
14+
<li><strong>Keywords:</strong> Add SEO keywords for search engines</li>
15+
<li><strong>Description:</strong> Set the meta description for search results</li>
16+
<li><strong>Body Style:</strong> Apply custom CSS styles to the document body</li>
17+
<li><strong>HTML Structure:</strong> Modify DOCTYPE and encoding settings</li>
18+
</ul>
19+
<p>Try editing this content and then use the Full Page HTML button to see how the plugin manages the complete document structure!</p>
20+
<p>To view the modified changes open preview which can be found under <strong>File</strong> in the menubar</p>
21+
</textarea>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
tinymce.init({
2+
selector: 'textarea#fullpagehtml',
3+
height: '800px',
4+
plugins: [
5+
"fullpagehtml", "advlist", "anchor", "autolink", "charmap", "code", "fullscreen",
6+
"help", "image", "insertdatetime", "link", "lists", "media",
7+
"preview", "searchreplace", "table", "visualblocks",
8+
],
9+
toolbar: "fullpagehtml | undo redo | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
10+
// Full Page HTML Plugin Configuration Options
11+
fullpagehtml_default_doctype: '<!DOCTYPE html>',
12+
fullpagehtml_default_title: 'Full Page HTML Plugin Demo Document',
13+
fullpagehtml_default_encoding: 'UTF-8',
14+
fullpagehtml_default_body_style: 'margin: 20px; padding: 15px; font-family: Georgia, Times, serif; font-size: 16px; color: #2c3e50;',
15+
fullpagehtml_hide_in_source_view: false // Show full page HTML in source view
16+
});
Lines changed: 1 addition & 0 deletions
Loading

modules/ROOT/images/icons/document-properties.svg

Lines changed: 0 additions & 10 deletions
This file was deleted.

modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@
315315
**** JWT Authentication
316316
***** xref:export-to-word-with-jwt-authentication-nodejs.adoc[Node.js]
317317
***** xref:export-to-word-with-jwt-authentication-php.adoc[PHP]
318+
*** xref:fullpagehtml.adoc[Full Page HTML]
318319
*** xref:footnotes.adoc[Footnotes]
319320
*** xref:formatpainter.adoc[Format Painter]
320321
*** xref:importword.adoc[Import from Word]

modules/ROOT/pages/8.1.0-release-notes.adoc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ include::partial$misc/admon-releasenotes-for-stable.adoc[]
2828

2929
The following new Premium plugin was released alongside {productname} {release-version}.
3030

31-
// === <Premium plugin name>
31+
=== Full Page HTML
3232

33-
// The new Premium plugin, **<Premium plugin name>** // description here.
33+
The new Premium plugin, **Full Page HTML** provides comprehensive control over document metadata and properties. It enables users to edit HTML document metadata such as title, keywords, and description through an intuitive dialog interface. When combined with the code plugin, it also exposes the complete HTML structure including `<head>`, `<body>`, and various meta tags in the source code view.
3434

35-
// For information on the **<Premium plugin name>** plugin, see xref:<plugincode>.adoc[<Premium plugin name>].
35+
For information on the **Full Page HTML** plugin, see xref:fullpagehtml.adoc[Full Page HTML].
3636

3737

3838
[[accompanying-premium-plugin-changes]]
@@ -329,9 +329,10 @@ As of {productname} {release-version}, the `content_css_cors` configuration opti
329329

330330
This section describes issues that users of {productname} {release-version} may encounter and possible workarounds for these issues.
331331

332-
There <is one | are <number> known issue<s> in {productname} {release-version}.
332+
There is one known issue in {productname} {release-version}.
333333

334-
// === <TINY-vwxyz 1 changelog entry>
335-
// #TINY-vwxyz1
334+
=== Full Page HTML plugin incompatibility with Suggested Edits and Revision History
336335

337-
// CCFR here.
336+
The Full Page HTML plugin enables document properties and metadata to be set. However, these are not picked up by Suggested Edits and Revision History, and actions performed in these plugins will overwrite the values set by the Full Page plugin.
337+
338+
**Workaround:** Avoid using the Full Page HTML plugin in combination with Suggested Edits or Revision History plugins to prevent data loss of document metadata and properties.

modules/ROOT/pages/available-menu-items.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ include::partial$misc/plugin-menu-item-id-boilerplate.adoc[]
100100
:plugincode: emoticons
101101
include::partial$misc/plugin-menu-item-id-boilerplate.adoc[]
102102

103+
:plugincategory: premium
104+
:pluginname: Full Page HTML
105+
:plugincode: fullpagehtml
106+
:pluginpage: fullpagehtml.adoc
107+
include::partial$misc/plugin-menu-item-id-boilerplate.adoc[]
108+
103109
:plugincategory: premium
104110
:pluginname: Export to PDF
105111
:plugincode: exportpdf

modules/ROOT/pages/available-toolbar-buttons.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ include::partial$misc/plugin-toolbar-button-id-boilerplate.adoc[]
112112
:plugincode: emoticons
113113
include::partial$misc/plugin-toolbar-button-id-boilerplate.adoc[]
114114

115+
:plugincategory: premium
116+
:pluginname: Full Page HTML
117+
:plugincode: fullpagehtml
118+
:pluginpage: fullpagehtml.adoc
119+
include::partial$misc/plugin-toolbar-button-id-boilerplate.adoc[]
120+
115121
:plugincategory: premium
116122
:pluginname: Export to PDF
117123
:plugincode: exportpdf
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
= Full Page HTML Plugin
2+
:navtitle: Full Page HTML
3+
:description: Edit metadata and document properties including title, keywords, and description via a dialog box, with HTML structure exposure in source code view.
4+
:description_short: Edit document metadata and properties with dialog interface and source code exposure.
5+
:keywords: full page html, metadata, document properties, title, keywords, description, HTML structure, source code
6+
:pluginname: Full Page HTML
7+
:plugincode: fullpagehtml
8+
:plugincategory: premium
9+
10+
include::partial$misc/admon-premium-plugin.adoc[]
11+
12+
include::partial$misc/admon-inline-not-supported.adoc[]
13+
14+
The {pluginname} plugin provides comprehensive control over document metadata and properties. It enables users to edit HTML document metadata such as title, keywords, and description through an intuitive dialog interface. When combined with the code plugin, it also exposes the complete HTML structure including `<head>`, `<body>`, and various meta tags in the source code view.
15+
16+
17+
== Interactive example
18+
19+
20+
liveDemo::{plugincode}[]
21+
22+
== Basic setup
23+
24+
To add the {pluginname} plugin to the editor, add `{plugincode}` to the `plugins` option in the editor configuration.
25+
26+
For example:
27+
28+
[source,js]
29+
----
30+
tinymce.init({
31+
selector: 'textarea', // change this value according to your HTML
32+
plugins: 'fullpagehtml',
33+
toolbar: 'fullpagehtml',
34+
fullpagehtml_default_doctype: '<!DOCTYPE html>'
35+
});
36+
----
37+
38+
[WARNING]
39+
====
40+
**Certain elements may be removed by XSS sanitization**
41+
By default, {productname} sanitizes HTML content to protect against XSS attacks. Elements outside the HTML5 specification, such as `<script>`, are removed. Standard `<meta>` tags are preserved, but attributes not defined in the HTML5 spec (for example, the RDFa `property` attribute) require explicit configuration to be retained.
42+
43+
If integrators encounter issues with required elements being removed, the following configuration options are available. These options reduce security and should be used with caution:
44+
45+
* `xss_sanitization: false` — Disables DOMPurify and removes all XSS protections.
46+
* `+valid_elements: '*[*]'+` — Allows all elements and attributes.
47+
* `extended_valid_elements: 'meta[*]'` — Extends the schema to allow additional `<meta>` attributes (for example, RDFa `property`).
48+
49+
Note that `extended_valid_elements` is *additive*, so all standard elements and attributes remain valid while additional ones are permitted.
50+
51+
For more details, see xref:security.adoc#xss_sanitization-option[xss_sanitization option] and xref:content-filtering.adoc#valid_elements[valid_elements option].
52+
53+
.Example: disabling DOMPurify with `xss_sanitization`
54+
[source,js]
55+
----
56+
tinymce.init({
57+
selector: 'textarea',
58+
plugins: 'fullpagehtml',
59+
toolbar: 'fullpagehtml',
60+
xss_sanitization: false // Disables TinyMCE's built-in XSS sanitization; allows potentially unsafe HTML
61+
});
62+
----
63+
64+
.Example: allowing all elements and attributes with `valid_elements`
65+
[source,js]
66+
----
67+
tinymce.init({
68+
selector: 'textarea',
69+
plugins: 'fullpagehtml',
70+
toolbar: 'fullpagehtml',
71+
valid_elements: '*[*]' // Permits all elements and attributes; use with extreme caution
72+
});
73+
----
74+
75+
.Example: extending `<meta>` support with `extended_valid_elements`
76+
[source,js]
77+
----
78+
tinymce.init({
79+
selector: 'textarea',
80+
plugins: 'fullpagehtml',
81+
toolbar: 'fullpagehtml',
82+
extended_valid_elements: 'meta[*]' // Permits additional <meta> attributes (such as RDFa property)
83+
});
84+
----
85+
86+
Support for the RDFa `property` attribute on `<meta>` elements is planned for inclusion in the default {productname} schema in future releases. If you require this attribute now, use `extended_valid_elements` as shown above.
87+
====
88+
89+
[NOTE]
90+
====
91+
**Incompatibility with Suggested Edits and Revision History**
92+
93+
The Full Page HTML plugin is not compatible with the Suggested Edits and Revision History plugins. Document properties and metadata set by the Full Page HTML plugin are not currently preserved when using these collaboration features, and may be lost during the review process.
94+
95+
**Recommendation:** Avoid using the {pluginname} plugin in combination with Suggested Edits or Revision History plugins to prevent data loss of document metadata and properties at this current time until this issue is resolved.
96+
====
97+
98+
== Options
99+
100+
The following configuration options affect the behavior of the {pluginname} plugin.
101+
102+
include::partial$configuration/fullpagehtml-default-doctype.adoc[leveloffset=+1]
103+
104+
include::partial$configuration/fullpagehtml-default-title.adoc[leveloffset=+1]
105+
106+
include::partial$configuration/fullpagehtml-default-encoding.adoc[leveloffset=+1]
107+
108+
include::partial$configuration/fullpagehtml-default-body-style.adoc[leveloffset=+1]
109+
110+
include::partial$configuration/fullpagehtml-hide-in-source-view.adoc[leveloffset=+1]
111+
112+
include::partial$misc/plugin-toolbar-button-id-boilerplate.adoc[]
113+
114+
include::partial$toolbar-button-ids/{plugincode}-toolbar-buttons.adoc[leveloffset=+1]
115+
116+
include::partial$misc/plugin-menu-item-id-boilerplate.adoc[]
117+
118+
include::partial$menu-item-ids/{plugincode}-menu-items.adoc[leveloffset=+1]
119+
120+
== Commands
121+
122+
The {pluginname} plugin provides the following {productname} command.
123+
124+
include::partial$commands/fullpagehtml-cmds.adoc[leveloffset=+1]

modules/ROOT/pages/how-to-guides.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ xref:events.adoc[Available Events]
9191

9292
List of common editor events
9393

94+
a|
95+
[.lead]
96+
xref:fullpagehtml.adoc[Full Page HTML Plugin]
97+
98+
Edit document metadata and properties including title, keywords, and description via dialog interface.
99+
94100
a|
95101
[.lead]
96102
xref:keyboard-shortcuts.adoc[Keyboard shortcuts]

0 commit comments

Comments
 (0)