Skip to content

Commit 67dbf05

Browse files
author
amandah
committed
fix broken hyperlinks, update export options documentation
1 parent 93d23a4 commit 67dbf05

File tree

10 files changed

+223
-314
lines changed

10 files changed

+223
-314
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* [Quick Actions API](docs/quick_actions.md)
1414
* [API References](docs/api_ref.md)
1515
* [Customization](docs/customization.md)
16+
* [Sample](sample/README.md)
1617
#
1718

1819
CC Everywhere SDK is an easy-to-integrate, customizable, all-in-one JavaScript library that brings CC Express (CCX) capabilities to all applications. Designed to support web (and in the future, mobile) platforms, over time it will include live template generation and other modular building blocks for content-first, task-based creative tooling drawn from CCX.
@@ -54,6 +55,7 @@ After the user launches the CCX editor component upon any user interaction you s
5455
* Reverse Video
5556
* Trim Video
5657

58+
Read more about the Quick Actions API [here](docs/quick_actions.md).
5759

5860
---
5961

docs/api_ref.md

Lines changed: 25 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
- [EditInputParams](#editinputparams)
1919
- [ExportOption](#exportoption)
2020
- [ExportButton](#exportbutton)
21-
- [ExportButtonGroup](#exportbuttongroup)
22-
- [CustomExportButton: Custom Button Clicks](#customexportbutton-custom-button-clicks)
21+
- [__label__](#label)
2322
- [NativeExportButton: Render a Native Button](#nativeexportbutton-render-a-native-button)
2423
- [Example](#example)
2524
- [ModalParams](#modalparams)
@@ -179,7 +178,7 @@ An Asset type has three properties:
179178

180179
| Property | Value(s)
181180
|:-- | :--
182-
| type | 'image' or 'video'
181+
| type | 'image'
183182
| dataType | 'base64'
184183
| data | string (base 64 representation of output)
185184

@@ -188,7 +187,7 @@ An Asset type has three properties:
188187
An OutputAsset type has an additional property, and 2 optional properties.
189188
| Property | Value(s)
190189
|:-- | :--
191-
| type | 'image' or 'video'
190+
| type | 'image'
192191
| dataType | 'base64'
193192
| data | string (base 64 representation of output)
194193
| fileType | 'jpeg', 'pdf', 'png', 'mp4'
@@ -261,38 +260,22 @@ Allows you to specify the project ID the target application (CCX Editor Componen
261260

262261
---
263262
## ExportOption
264-
This interface describes the base object for export buttons and groups. Allows you to define export buttons and groups for a Quick Action. All the properties are optional.
263+
Allows you to define export buttons and groups for a Quick Action. All the properties are optional. Must be specified in [QuickActionsInputParams](#quickactioninputparams) - it can be an empty array.
265264

266265

267266
### ExportButton
268-
This interface describes the base object that is used to render a button once the quick action has completed the action.
267+
This interface describes the base object that is used to render a button once the quick action has completed the action.
268+
269269
| Property | Value | Description
270270
| :-- | :--|:--
271271
|optionType| "button" | QA renders single standalone button
272-
|label| string | Export label name
272+
|[label](#label)| string | Export label name
273273
|variant | "cta"/"primary"/"secondary" | Defines the [style](https://spectrum.adobe.com/page/button/) of a button.
274-
| buttonType | 'custom' or 'native' | Type of export button ([Custom](#customexportbutton-custom-button-clicks)/[Native](#nativeexportbutton-render-a-native-button))
274+
| buttonType | 'native' | Type of export button ([Native](#nativeexportbutton-render-a-native-button))
275275
| optionType | 'button' | Type of ExportOption
276276

277-
### ExportButtonGroup
278-
This interface describes the object that is used to render a group of buttons which will be shown as a drop down under a parent button.
279-
| Property | Value | Description
280-
| :-- | :--|:--
281-
|optionType| "group" | QA renders drop-down button
282-
|label| string | Export label name
283-
|variant | "cta"/"primary"/"secondary" | Defines the [style](https://spectrum.adobe.com/page/button/) of a button.
284-
| buttons | array of [ExportButton](#export-button) | List of buttons under a dropdown menu
285-
286-
287-
### CustomExportButton: Custom Button Clicks
288-
289-
This interface describes an object that is used to render a custom button once the quick action has completed the action. On button click, the id will be passed back in the `onPublish` callback, along with the asset data.
290-
| Property | Value | Description
291-
| :-- | :--|:--
292-
|id| string | ID of the export button
293-
|label| string | Localized text of the export button
294-
|target | 'Host' | Used to render a custom button. Currently only 'Host'.
295-
| buttonType | 'custom' | Type of button
277+
#### __label__
278+
"label" defaults to "Customize" when the target is "Editor" and "Download" when the target is "Download".
296279

297280
### NativeExportButton: Render a Native Button
298281

@@ -303,29 +286,16 @@ This interface describes an object that is used to render a native button once t
303286
| | 'new' | QA handles button click in a new tab/window
304287
|target | 'Download' | On click will download the asset
305288
| | 'Editor' | On click will open the asset in CCX
306-
| buttonType | 'custom' | Type of button
289+
| buttonType | 'native' | Type of button
307290

308291
### Example
309292
```
310293
const exportOptions = [
311-
// EXPORT BUTTON GROUP
312-
{
313-
label: 'Open In',
314-
optionType: 'group',
315-
variant: 'cta',
316-
buttons: [
317-
{
318-
target: "Editor",
319-
label: "Express",
320-
buttonType: "native",
321-
optionType: "button"
322-
},]
323-
},
324-
/** target: allows the Quick Task to determine type of export */
294+
295+
** target: allows the Quick Task to determine type of export */
325296
{
326-
target: 'Host',
327-
id: '@id/random',
328-
label: 'Save in Your App',
297+
// Customize in Express button
298+
target: 'Editor',
329299
variant: 'cta',
330300
optionType: 'button',
331301
buttonType: 'custom'
@@ -364,15 +334,16 @@ Allows you to specify the asset and export buttons/groups you want to perform a
364334
---
365335

366336
## Table of Contents
367-
* [Overview](README.md)
337+
* [Overview](../README.md)
368338
* Get Started
369-
* [Configuration](docs/configuration.md)
370-
* [Local Development](docs/local_dev.md)
371-
* [Quick Start](docs/quickstart.md)
339+
* [Configuration](configuration.md)
340+
* [Local Development](local_dev.md)
341+
* [Quick Start](quickstart.md)
372342
* SDK Components
373343
* CCX Editor Component
374-
* [Create Project API](docs/create_project.md)
375-
* [Open Project API](docs/edit_project.md)
376-
* [Quick Actions API](docs/quick_actions.md)
377-
* [API References](docs/api_ref.md)
378-
* [Customization](docs/customization.md)
344+
* [Create Project API](create_project.md)
345+
* [Open Project API](edit_project.md)
346+
* [Quick Actions API](quick_actions.md)
347+
* [API References](api_ref.md)
348+
* [Customization](customization.md)
349+
* [Sample](../sample/README.md)

docs/configuration.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
# Configuration Steps
22

33
## Table of Contents
4-
* [Overview](README.md)
4+
* [Overview](../README.md)
55
* Get Started
6-
* [Configuration](docs/configuration.md)
7-
* [Local Development](docs/local_dev.md)
8-
* [Quick Start](docs/quickstart.md)
6+
* [Configuration](configuration.md)
7+
* [Local Development](local_dev.md)
8+
* [Quick Start](quickstart.md)
99
* SDK Components
1010
* CCX Editor Component
11-
* [Create Project API](docs/create_project.md)
12-
* [Open Project API](docs/edit_project.md)
13-
* [Quick Actions API](docs/quick_actions.md)
14-
* [API References](docs/api_ref.md)
15-
* [Customization](docs/customization.md)
11+
* [Create Project API](create_project.md)
12+
* [Open Project API](edit_project.md)
13+
* [Quick Actions API](quick_actions.md)
14+
* [API References](api_ref.md)
15+
* [Customization](customization.md)
16+
* [Sample](../sample/README.md)
1617
#
1718

1819

docs/create_project.md

Lines changed: 53 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
# Creating a Project
22
## Table of Contents
3-
* [Overview](README.md)
3+
* [Overview](../README.md)
44
* Get Started
5-
* [Configuration](docs/configuration.md)
6-
* [Local Development](docs/local_dev.md)
7-
* [Quick Start](docs/quickstart.md)
5+
* [Configuration](configuration.md)
6+
* [Local Development](local_dev.md)
7+
* [Quick Start](quickstart.md)
88
* SDK Components
99
* CCX Editor Component
10-
* [Create Project API](docs/create_project.md)
11-
* [Open Project API](docs/edit_project.md)
12-
* [Quick Actions API](docs/quick_actions.md)
13-
* [API References](docs/api_ref.md)
14-
* [Customization](docs/customization.md)
10+
* [Create Project API](create_project.md)
11+
* [Open Project API](edit_project.md)
12+
* [Quick Actions API](quick_actions.md)
13+
* [API References](api_ref.md)
14+
* [Customization](customization.md)
15+
* [Sample](../sample/README.md)
1516
#
1617
## Create Project in CCX Editor: Create Project API
1718
Users can launch a new project in a CCX editor, using the Create Project API. The CCEverywhere Object exposes this API with the `createDesign()` method.
@@ -26,7 +27,7 @@ This function creates a new design using CCEverywhere and takes an object of par
2627
* [modalParams](api_ref.md#modalparams): determines size of CCX editor modal
2728
* [inputParams](api_ref.md#createinputparams) canvasAspectId, template types, template search
2829
* [outputParams](api_ref.md#ccxoutputparams): output type
29-
* [Callbacks](api_ref.md#callbacks)
30+
* [callbacks](api_ref.md#callbacks)
3031

3132
```
3233
ccEverywhere.createDesign(
@@ -61,59 +62,60 @@ When the "createDesign" button is clicked, the Create Project API is called and
6162
<title>Create Project Sample</title>
6263
</head>
6364
<body>
64-
<button id="createDesign">Create project</button>
65-
<img id="savedDesign" height="420" width="420" />
65+
<button id="create-project-button">Create project</button>
66+
<img id="image-container" height="420" width="420" />
6667
6768
<script type="text/javascript" src="./CCEverywhere.js"></script>
6869
<script type="text/javascript">
69-
// Initialize projectId to null until it gets set by onPublish callback
70-
var projectId = null;
71-
// Set to null until CCEverywhere object is initialized
72-
var ccEverywhere = null;
73-
var imageData = document.getElementById("savedDesign");
74-
const createButton = document.getElementById("createDesign");
70+
71+
/* Initialize projectId to null until it gets set by onPublish callback */
72+
var projectId = null;
73+
/* Set to null until CCEverywhere object is initialized */
74+
var ccEverywhere = null;
75+
var imageContainer = document.getElementById("image-container");
76+
const createButton = document.getElementById("create-project-button");
7577
76-
ccEverywhere = CCEverywhere.default.initialize(
77-
{
78-
clientId: YOUR_CLIENT_ID,
79-
appName: PROJECT_NAME,
80-
appVersion: { major: 1, minor: 0 },
81-
platformCategory: 'web'
82-
}
83-
);
78+
ccEverywhere = CCEverywhere.default.initialize(
79+
{
80+
clientId: YOUR_CLIENT_ID,
81+
appName: PROJECT_NAME,
82+
appVersion: { major: 1, minor: 0 },
83+
platformCategory: 'web'
84+
}
85+
);
8486
85-
createButton.onclick = () => {
86-
const createDesignCallback = {
87-
onCancel: () => {},
88-
onPublish: (publishParams) => {
89-
// User clicked "Save"
90-
// Save image data to render in sample
91-
// Save projectId for editing later
92-
const localData = {
93-
project: publishParams.projectId,
94-
image: publishParams.asset.data
95-
};
96-
imageData.src = localData.image;
97-
projectId = localData.project;
98-
},
99-
onError: (err) => {
100-
console.error('Error received is', err.toString());
101-
},
102-
};
87+
createButton.onclick = () => {
88+
const createDesignCallback = {
89+
onCancel: () => {},
90+
onPublish: (publishParams) => {
91+
/* User clicked "Save"
92+
Save image data to render in sample
93+
Save projectId for editing later */
94+
const localData = {
95+
project: publishParams.projectId,
96+
image: publishParams.asset.data
97+
};
98+
imageContainer.src = localData.image;
99+
projectId = localData.project;
100+
},
101+
onError: (err) => {
102+
console.error('Error received is', err.toString());
103+
},
104+
};
103105
104-
ccEverywhere.createDesign(
105-
{
106-
callbacks: createDesignCallback
107-
}
108-
);
109-
}
106+
ccEverywhere.createDesign(
107+
{
108+
callbacks: createDesignCallback
109+
}
110+
);
111+
}
110112
</script>
111113
</body>
112114
</html>
113115
```
114116
__Notes__:
115117
- When `onPublish` is called, we save the project ID in a global variable `projectId` so we can use it to modify the same project later.
116-
- "savedDesign" is the ID of an image element, and its source tag is updated to reflect user's project creations and edits. "createDesign" is the ID of a button element, and click events on this button launch the editor.
118+
- "imageContainer" is the ID of an image element, and its source tag is updated to reflect user's project creations and edits. "create-project-button" is the ID of a button element, and click events on this button launch the editor.
117119

118120

119121
Now that you have created a project and rendered the final design onto your own page, let's explore the [Open Project API](edit_project.md) to see how you can launch the editor to make changes to existing projects.

docs/customization.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
# Customization
22
## Table of Contents
3-
* [Overview](README.md)
3+
* [Overview](../README.md)
44
* Get Started
5-
* [Configuration](docs/configuration.md)
6-
* [Local Development](docs/local_dev.md)
7-
* [Quick Start](docs/quickstart.md)
5+
* [Configuration](configuration.md)
6+
* [Local Development](local_dev.md)
7+
* [Quick Start](quickstart.md)
88
* SDK Components
99
* CCX Editor Component
10-
* [Create Project API](docs/create_project.md)
11-
* [Open Project API](docs/edit_project.md)
12-
* [Quick Actions API](docs/quick_actions.md)
13-
* [API References](docs/api_ref.md)
14-
* [Customization](docs/customization.md)
10+
* [Create Project API](create_project.md)
11+
* [Open Project API](edit_project.md)
12+
* [Quick Actions API](quick_actions.md)
13+
* [API References](api_ref.md)
14+
* [Customization](customization.md)
15+
* [Sample](../sample/README.md)
1516
#
1617

1718
## Locale

0 commit comments

Comments
 (0)