Skip to content

Commit dccb10e

Browse files
committed
DOC-3224: Refactor, generate new seperate page, include demo and replace old icons.
1 parent a6ccc56 commit dccb10e

File tree

14 files changed

+308
-44
lines changed

14 files changed

+308
-44
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
tinymce.init({
2+
selector: 'textarea',
3+
plugins: 'uploadcare link',
4+
toolbar: 'link',
5+
uploadcare_public_key: '<your-public-key>',
6+
documents_file_types: [
7+
{ mimeType: 'application/msword', extensions: [ 'doc' ] },
8+
{ mimeType: 'application/vnd.ms-excel', extensions: [ 'xls' ] },
9+
{ mimeType: 'application/vnd.ms-powerpoint', extensions: [ 'ppt', 'pps' ] },
10+
{ mimeType: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', extensions: [ 'docx' ] },
11+
{ mimeType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', extensions: [ 'xlsx' ] },
12+
{ mimeType: 'application/vnd.openxmlformats-officedocument.presentationml.presentation', extensions: [ 'pptx' ] },
13+
{ mimeType: 'application/pdf', extensions: [ 'pdf' ] },
14+
{ mimeType: 'application/rtf', extensions: [ 'rtf' ] },
15+
{ mimeType: 'text/plain', extensions: [ 'txt' ] },
16+
{ mimeType: 'application/vnd.apple.keynote', extensions: [ 'key' ] },
17+
{ mimeType: 'application/vnd.apple.pages', extensions: [ 'pages' ] },
18+
{ mimeType: 'application/vnd.apple.numbers', extensions: [ 'numbers' ] },
19+
{ mimeType: 'audio/wav', extensions: [ 'wav', 'wave' ] },
20+
{ mimeType: 'audio/mpeg', extensions: [ 'mp3' ] },
21+
{ mimeType: 'audio/ogg', extensions: [ 'ogg' ] },
22+
{ mimeType: 'application/zip', extensions: [ 'zip' ] },
23+
{ mimeType: 'application/gzip', extensions: [ 'gz', 'gzip' ] },
24+
{ mimeType: 'application/x-tar', extensions: [ 'tar' ] },
25+
{ mimeType: 'application/x-gtar', extensions: [ 'tar.gz', 'tgz' ] },
26+
{ mimeType: 'application/x-compressed-tar', extensions: [ 'tar.gz', 'tgz' ] },
27+
{ mimeType: 'application/x-7z-compressed', extensions: [ '7z' ] },
28+
{ mimeType: 'application/vnd.rar', extensions: [ 'rar' ] }
29+
]
30+
});
31+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<textarea id="uploadcare-documents">
2+
<h1>Streamline Your Document Workflow: Professional File Management Made Simple</h1>
3+
<p><span style="color: #4e5c73;">In today&rsquo;s digital workspace, managing documents efficiently isn&rsquo;t just a convenience&mdash;it&rsquo;s essential for productivity. Whether you&rsquo;re sharing reports, distributing resources, or linking to important files, the Media Optimizer plugin transforms how you handle document uploads and file management.&nbsp;</span></p>
4+
<p>With seamless integration through the Link plugin&rsquo;s dialog, uploading and linking documents has never been easier. Simply click the Link button, navigate to the Upload tab, and your files are processed through Uploadcare&rsquo;s secure infrastructure&mdash;ready to share in seconds.</p>
5+
<blockquote><em>"Document file uploads have become a cornerstone of modern content management, enabling teams to share resources effortlessly while maintaining professional standards,"</em> &mdash; Sarah Chen, Content Strategy Director at Digital Solutions Inc.</blockquote>
6+
<p>According to recent workflow analysis, teams that implement streamlined document upload processes see an average improvement of 40% in content creation efficiency. This enhanced productivity, combined with secure file handling and automatic optimization, makes document file uploads an essential feature for any content management system.&nbsp;</p>
7+
<h2>Experience Seamless Document Uploads</h2>
8+
<p class="p1">Before we explore the comprehensive file type support, let&rsquo;s understand how document uploads work in practice.</p>
9+
<p class="p1">The Media Optimizer plugin automatically configures everything you need when both the uploadcare and link plugins are enabled. Simply select your file, and it&rsquo;s uploaded, processed, and linked automatically&mdash;no complex setup required.</p>
10+
<h2 class="p1">Comprehensive File Type Support: Your Documents, Your Way&nbsp;</h2>
11+
<p>The Media Optimizer plugin supports an extensive range of file types, ensuring you can upload and link virtually any document your team needs:</p>
12+
<ul>
13+
<li><strong>Office Documents:</strong> PDF, Word (doc, docx), Excel (xls, xlsx), PowerPoint (ppt, pps, pptx), RTF, and plain text files</li>
14+
<li><strong>iWork Files:</strong> Keynote presentations, Pages documents, and Numbers spreadsheets</li>
15+
<li><strong>Audio Files:</strong> WAV, MP3, and OGG formats for multimedia content</li>
16+
<li><strong>Archive Files:</strong> ZIP, GZIP, TAR, TAR.GZ, 7Z, and RAR for compressed content distribution</li>
17+
</ul>
18+
<p>This comprehensive support means you can handle everything from quarterly reports and presentation decks to audio guides and resource archives&mdash;all through a single, unified interface.</p>
19+
<h2>Real-World Applications</h2>
20+
<p>Document file uploads are perfect for a wide variety of professional scenarios:</p>
21+
<ul>
22+
<li><strong>Knowledge Base Management:</strong> Share technical documentation, user guides, and reference materials</li>
23+
<li><strong>Resource Distribution:</strong> Provide downloadable whitepapers, case studies, and marketing materials</li>
24+
<li><strong>Collaborative Workflows:</strong> Enable team members to upload and share project files, templates, and assets</li>
25+
<li><strong>Content Enrichment:</strong> Link to supplementary materials, audio guides, and multimedia resources</li>
26+
</ul>
27+
<p>Every uploaded file is processed through Uploadcare&rsquo;s enterprise-grade infrastructure, ensuring secure storage, fast delivery, and reliable access for your users.</p>
28+
<h2>Get Started Today</h2>
29+
<p>Ready to transform your document management workflow? Try uploading a document now using the Link button in the toolbar. Click the Link button, select the Upload tab, and experience the simplicity of professional file management.</p>
30+
</textarea>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
tinymce.init({
2+
selector: "textarea#uploadcare-documents",
3+
plugins: 'uploadcare link',
4+
toolbar: 'link',
5+
uploadcare_public_key: '630992ad50fe2291c406',
6+
uploadcare_cdn_base_url: 'https://tiny.ucarecdn.com',
7+
uploadcare_store_type: 'temporary',
8+
documents_file_types: [
9+
{ mimeType: 'application/msword', extensions: [ 'doc' ] },
10+
{ mimeType: 'application/vnd.ms-excel', extensions: [ 'xls' ] },
11+
{ mimeType: 'application/vnd.ms-powerpoint', extensions: [ 'ppt', 'pps' ] },
12+
{ mimeType: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', extensions: [ 'docx' ] },
13+
{ mimeType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', extensions: [ 'xlsx' ] },
14+
{ mimeType: 'application/vnd.openxmlformats-officedocument.presentationml.presentation', extensions: [ 'pptx' ] },
15+
{ mimeType: 'application/pdf', extensions: [ 'pdf' ] },
16+
{ mimeType: 'application/rtf', extensions: [ 'rtf' ] },
17+
{ mimeType: 'text/plain', extensions: [ 'txt' ] },
18+
{ mimeType: 'application/vnd.apple.keynote', extensions: [ 'key' ] },
19+
{ mimeType: 'application/vnd.apple.pages', extensions: [ 'pages' ] },
20+
{ mimeType: 'application/vnd.apple.numbers', extensions: [ 'numbers' ] },
21+
{ mimeType: 'audio/wav', extensions: [ 'wav', 'wave' ] },
22+
{ mimeType: 'audio/mpeg', extensions: [ 'mp3' ] },
23+
{ mimeType: 'audio/ogg', extensions: [ 'ogg' ] },
24+
{ mimeType: 'application/zip', extensions: [ 'zip' ] },
25+
{ mimeType: 'application/gzip', extensions: [ 'gz', 'gzip' ] },
26+
{ mimeType: 'application/x-tar', extensions: [ 'tar' ] },
27+
{ mimeType: 'application/x-gtar', extensions: [ 'tar.gz', 'tgz' ] },
28+
{ mimeType: 'application/x-compressed-tar', extensions: [ 'tar.gz', 'tgz' ] },
29+
{ mimeType: 'application/x-7z-compressed', extensions: [ '7z' ] },
30+
{ mimeType: 'application/vnd.rar', extensions: [ 'rar' ] }
31+
],
32+
height: 700,
33+
content_style: `
34+
body { max-width: 920px; margin: 1.5rem auto; padding: 0 2vw; }
35+
h1 { font-size: 1.5em; }
36+
h2 { font-size: 1.17em; }
37+
h1, h2, h3, h4, h5, h6 { font-weight: 500; margin: 0 0 0.75rem; }
38+
p + h1, p + h2, p + h3, p + h4, p + h5, p + h6 { margin-top: 2rem; }
39+
p { line-height: 1.6; margin: 0; }
40+
p + p { margin-top: 1rem; }
41+
a { color: #2b70e3; }
42+
blockquote { color: #4e5c73; font-weight: 200; font-size: 1.3rem; margin: 1rem 2rem; padding: 0 0 0 1rem; border-left: 2px solid #2b70e3 !important; }
43+
ul, ol { margin: 0.5rem 0; padding-left: 2rem; }
44+
li { margin: 0.25rem 0; }
45+
`
46+
});
47+
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

modules/ROOT/nav.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,14 @@
286286
***** xref:import-from-word-with-jwt-authentication-nodejs.adoc[Node.js]
287287
***** xref:import-from-word-with-jwt-authentication-php.adoc[PHP]
288288
*** xref:editimage.adoc[Image Editing]
289-
*** xref:uploadcare.adoc[Media Optimizer]
290-
**** xref:uploadcare-image.adoc[Image]
291-
**** xref:uploadcare-video.adoc[Video]
292289
*** xref:inline-css.adoc[Inline CSS]
293290
*** xref:linkchecker.adoc[Link Checker]
294291
*** xref:math.adoc[Math]
295292
*** xref:markdown.adoc[Markdown]
293+
*** xref:uploadcare.adoc[Media Optimizer]
294+
**** xref:uploadcare-image.adoc[Image]
295+
**** xref:uploadcare-video.adoc[Video]
296+
**** xref:uploadcare-documents.adoc[Documents]
296297
*** xref:mentions.adoc[Mentions]
297298
*** xref:mergetags.adoc[Merge Tags]
298299
*** xref:moxiemanager.adoc[MoxieManager]
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
= Media Optimizer (Documents)
2+
:navtitle: Documents feature of the Media Optimizer plugin
3+
:description: The Documents feature of the Media Optimizer plugin allows you to upload and link document files in your content.
4+
:description_short: upload and link document files in your content.
5+
:plugincode: uploadcare
6+
:pluginname: Media Optimizer's Documents feature
7+
:keywords: plugin, {plugincode}, documents, files, upload, pdf, word, excel, powerpoint, link
8+
:plugincategory: premium
9+
10+
include::partial$misc/admon-premium-plugin.adoc[]
11+
12+
== Overview
13+
14+
The Documents feature of the {pluginname} plugin enables users to upload and link document files (PDF, Word, Excel, PowerPoint, and more) directly within the editor through the xref:link.adoc[Link] plugin's dialog. The plugin automatically configures the necessary options to enable file uploads in the link dialog when both the {pluginname} plugin and the Link plugin are enabled.
15+
16+
== Key benefits
17+
18+
* Upload and link document files directly within the editor
19+
* Support for a wide range of file types including documents, iWork files, audio files, and archives
20+
* Automatic configuration of file upload handlers when both plugins are enabled
21+
* Secure file uploads through Uploadcare's infrastructure
22+
* Customizable list of supported file types
23+
* Drag-and-drop file upload support
24+
* URL-based file linking
25+
26+
== Interactive example
27+
28+
liveDemo::uploadcare-documents[]
29+
30+
== Basic setup
31+
32+
To enable document file uploads, include both `uploadcare` and `link` in the `plugins` option in the editor configuration. The {pluginname} plugin will automatically configure the necessary options to enable file uploads in the link dialog.
33+
34+
.Example
35+
[source,js]
36+
----
37+
tinymce.init({
38+
selector: 'textarea',
39+
plugins: 'uploadcare link',
40+
toolbar: 'link',
41+
uploadcare_public_key: '<your-public-key>',
42+
documents_file_types: [
43+
{ mimeType: 'application/msword', extensions: [ 'doc' ] },
44+
{ mimeType: 'application/vnd.ms-excel', extensions: [ 'xls' ] },
45+
{ mimeType: 'application/vnd.ms-powerpoint', extensions: [ 'ppt', 'pps' ] },
46+
{ mimeType: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', extensions: [ 'docx' ] },
47+
{ mimeType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', extensions: [ 'xlsx' ] },
48+
{ mimeType: 'application/vnd.openxmlformats-officedocument.presentationml.presentation', extensions: [ 'pptx' ] },
49+
{ mimeType: 'application/pdf', extensions: [ 'pdf' ] },
50+
{ mimeType: 'application/rtf', extensions: [ 'rtf' ] },
51+
{ mimeType: 'text/plain', extensions: [ 'txt' ] },
52+
{ mimeType: 'application/vnd.apple.keynote', extensions: [ 'key' ] },
53+
{ mimeType: 'application/vnd.apple.pages', extensions: [ 'pages' ] },
54+
{ mimeType: 'application/vnd.apple.numbers', extensions: [ 'numbers' ] },
55+
{ mimeType: 'audio/wav', extensions: [ 'wav', 'wave' ] },
56+
{ mimeType: 'audio/mpeg', extensions: [ 'mp3' ] },
57+
{ mimeType: 'audio/ogg', extensions: [ 'ogg' ] },
58+
{ mimeType: 'application/zip', extensions: [ 'zip' ] },
59+
{ mimeType: 'application/gzip', extensions: [ 'gz', 'gzip' ] },
60+
{ mimeType: 'application/x-tar', extensions: [ 'tar' ] },
61+
{ mimeType: 'application/x-gtar', extensions: [ 'tar.gz', 'tgz' ] },
62+
{ mimeType: 'application/x-compressed-tar', extensions: [ 'tar.gz', 'tgz' ] },
63+
{ mimeType: 'application/x-7z-compressed', extensions: [ '7z' ] },
64+
{ mimeType: 'application/vnd.rar', extensions: [ 'rar' ] }
65+
]
66+
});
67+
----
68+
69+
[NOTE]
70+
====
71+
The {pluginname} plugin automatically configures the xref:link.adoc#files_upload_handler[`+files_upload_handler+`] and `+documents_file_types+` options when both the Link plugin and the {pluginname} plugin are enabled. This enables file uploads in the Link dialog without requiring manual configuration. However, you can customize the list of supported file types by explicitly setting the xref:uploadcare.adoc#documents-file-types[`+documents_file_types+`] option as shown in the example above.
72+
====
73+
74+
== Document Operations
75+
76+
Below is an overview of the features provided by the {pluginname} plugin for document file uploads:
77+
78+
[cols="1,1,4",options="header"]
79+
|===
80+
| Toolbar button | Icon | Description
81+
82+
| `+link+`
83+
| image:icons/link.svg[link.svg]
84+
| Opens the Insert/edit link dialog so the user can upload with file picker or dropping file to be uploaded. Uploaded files are processed through Uploadcare's infrastructure and automatically linked in the content.
85+
|===
86+
87+
The {pluginname} plugin supports a comprehensive list of file types:
88+
89+
* **Documents:** PDF, Word (doc, docx), Excel (xls, xlsx), PowerPoint (ppt, pps, pptx), RTF, plain text (txt)
90+
* **iWork files:** Keynote (key), Pages (pages), Numbers (numbers)
91+
* **Audio files:** WAV (wav, wave), MP3 (mp3), OGG (ogg)
92+
* **Archive files:** ZIP (zip), GZIP (gz, gzip), TAR (tar), TAR.GZ (tar.gz, tgz), 7Z (7z), RAR (rar)
93+
94+
When both the {pluginname} plugin and the Link plugin are enabled, the Link dialog displays an "Upload" tab that enables file uploads. Users can upload files via drag-and-drop, file selection, or by providing a URL. Uploaded files are processed through Uploadcare's infrastructure and automatically linked in the content.
95+
96+
== Options
97+
98+
The following configuration options affect the behavior of the Documents feature:
99+
100+
:includedSection: uploadcarePlugin
101+
include::partial$configuration/documents_file_types.adoc[leveloffset=+1]
102+
:!includedSection:
103+
104+
:pluginfeature: uc-documents
105+
include::partial$misc/plugin-toolbar-button-id-boilerplate.adoc[]
106+
107+
include::partial$misc/plugin-menu-item-id-boilerplate.adoc[]
108+

modules/ROOT/pages/uploadcare-image.adoc

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,27 @@ tinymce.init({
5252
The {pluginname} plugin overrides the xref:quickbars.adoc[Quickbar] quickimage toolbar item. To ensure a better user experience and to avoid having two image buttons configure `quickbars_insert_toolbar` to omit the `quickimage` toolbar item.
5353
====
5454

55-
5655
== Image Operations
5756

5857
Below is an overview of the features provided by the {pluginname} plugin for image optimization:
5958

59+
[cols="1,1,^1,3",options="header"]
60+
|===
61+
| Feature | | Icon | Description
62+
63+
| Upload
64+
|
65+
| image:icons/upload-from-device.svg[upload-from-device.svg]
66+
| Upload images via drag-and-drop, file selection, or URL input
67+
68+
| Upload from URL
69+
|
70+
| image:icons/upload-from-link.svg[upload-from-link.svg]
71+
| Upload images from a URL
72+
|===
73+
74+
Below is an overview of the image editing features provided by the {pluginname} plugin:
75+
6076
[cols="1,1,^1,3",options="header"]
6177
|===
6278
| Feature | Operation | Icon | Description

modules/ROOT/pages/uploadcare-video.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ Below is an overview of the features provided by the Video Optimizer plugin:
6060
| Feature | Icon | Description
6161

6262
| Upload
63-
| image:icons/folder.svg[folder.svg]
63+
| image:icons/upload-from-device.svg[upload-from-device.svg]
6464
| Upload videos via drag-and-drop, file selection, or URL input
6565

6666
| Upload from URL
67-
| image:icons/link.svg[link.svg]
67+
| image:icons/upload-from-link.svg[upload-from-link.svg]
6868
| Upload videos from a URL
6969
|===
7070

modules/ROOT/pages/uploadcare.adoc

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ tinymce.init({
5454

5555
For a complete guide to the features provided by the {pluginname} plugin, see the following pages:
5656

57-
[cols="1,1"]
57+
[cols="1,1,1"]
5858
|===
5959

6060
a|
@@ -69,6 +69,12 @@ xref:uploadcare-video.adoc#[Video]
6969

7070
Video optimization options, including video player customization, resizing, and adjusting.
7171

72+
a|
73+
[.lead]
74+
xref:uploadcare-documents.adoc#[Documents]
75+
76+
Document file upload and linking options, including support for PDF, Word, Excel, PowerPoint, and more.
77+
7278
a|
7379
|===
7480

@@ -87,25 +93,6 @@ include::partial$configuration/uploadcare_store_type.adoc[leveloffset=+1]
8793

8894
include::partial$configuration/uploadcare_resources.adoc[leveloffset=+1]
8995

90-
:includedSection: uploadcarePlugin
91-
include::partial$configuration/documents_file_types.adoc[leveloffset=+1]
92-
:!includedSection:
93-
94-
[NOTE]
95-
====
96-
**File Upload Support**
97-
98-
The Media Optimizer plugin supports file uploads for documents and other file types through the xref:link.adoc[Link] plugin's dialog. The `+link+` plugin must be enabled for file uploads via the Insert/Edit Link dialog to work.
99-
100-
When both the `+link+` plugin and the Media Optimizer plugin are enabled, the Media Optimizer plugin automatically configures the xref:link.adoc#files_upload_handler[`+files_upload_handler+`] and xref:uploadcare.adoc#documents-file-types[`+documents_file_types+`] options to enable file uploads in the link dialog.
101-
102-
By default, the Media Optimizer plugin supports a comprehensive list of file types including documents (PDF, Word, Excel, PowerPoint, RTF, plain text), iWork files (Keynote, Pages, Numbers), audio files (WAV, MP3, OGG), and archive files (ZIP, GZIP, TAR, 7Z, RAR). You can customize this list by setting the xref:uploadcare.adoc#documents-file-types[`+documents_file_types+`] option.
103-
104-
When the Media Optimizer plugin sets `+documents_file_types+`, this option acts as the source of truth for supported file types. Both the Link plugin and the Media Optimizer plugin will use this list, ensuring consistent file type validation across the editor.
105-
106-
These options are part of the xref:link.adoc[Link plugin] and can also be configured independently. If you set `+documents_file_types+` manually, both the Link plugin and Media Optimizer plugin will use your custom list. For more information about file upload configuration, see the xref:link.adoc[Link plugin] documentation.
107-
====
108-
10996
:includedSection: uploadcarePlugin
11097
include::partial$configuration/a11y_advanced_options.adoc[leveloffset=+1]
11198
:!includedSection:

0 commit comments

Comments
 (0)