Skip to content

Commit 03ffa26

Browse files
Petar VukmirovicPetar Vukmirovic
authored andcommitted
Another small changes pass
1 parent e2098da commit 03ffa26

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/custom-blob-document-api.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ To register a new document type, follow the steps below:
185185
};
186186
```
187187

188-
6. Update the build instructions and manifest by replacing the contents of `build-extension.mjs` with the code below:
188+
6. Update the build instructions by replacing the contents of `build-extension.mjs` with the code below:
189189

190190
```javascript {hl_lines=["16-19"]}
191191
import * as esbuild from 'esbuild'
@@ -229,32 +229,34 @@ To register a new document type, follow the steps below:
229229

230230
```json {hl_lines=["6"]}
231231
{
232-
"mendixComponent": {
232+
"mendixComponent": {
233233
"entryPoints": {
234-
"main": "main.js",
235-
"ui": {
234+
"main": "main.js",
235+
"ui": {
236236
"editor": "editor.js"
237+
}
237238
}
238-
}
239-
}
239+
}
240240
}
241241
```
242242

243243
## Explanation
244244

245245
### Register the Document Type
246246

247-
In `src/main/index.ts`, you begin by registering a new document type. Once registered, you can perform all CRUD operations on it. However, will not appear in the UI until an editor is also registered.
247+
In `src/main/index.ts`, you begin by registering a new document type. Once registered, you can perform all CRUD operations on it. However, it will not appear in the UI until an editor is also registered.
248248

249249
Optionally, you can provide a `readableTypeName` to display a user-friendly name in logs and the Studio Pro UI instead of the full type name. You can also customize serialization of the document contents to a string. By default, the API uses `JSON.stringify` for serialization and `JSON.parse` for deserialization.
250250

251251
### Register the Editor
252252

253-
Make a call to the Studio Pro API to register an editor for the document type. This does the following:
253+
The next call to the Studio Pro API in `src/main/index.ts` registers an editor for the document type. This does the following:
254254

255-
* It registers the `editor` entry point of the extension to the document type, so the editor is shown when users interacts with the document in Studio Pro (for example, through the App Explorer or **Find Results**).
255+
* It registers the `editor` entry point of the extension to the document type, so the editor is shown when users interacts with the document in Studio Pro (for example, through the **App Explorer** or **Find Results**).
256256
* This editor is shown as a tab, but you can also configure it to be shown as a modal dialog.
257257
* Icons for both the light and dark themes are registered; these icons appear wherever a document icon is needed.
258+
* Note that this editor will behave like editors for other, built-in, document types. For example, `studioPro.ui.editors.editDocument` call will open the registered editor for
259+
custom documents.
258260

259261
### Changes in the Editor
260262

@@ -266,7 +268,7 @@ We then provide a way to save changes.
266268

267269
### Update Build and Manifest Files
268270

269-
Highlight the necessary changes in `build-extension.mjs` and `manifest.json` to ensure the `editor` entry point is built and loaded properly.
271+
Highlighted text in `build-extension.mjs` and `manifest.json` shows changes necessary to ensure the `editor` entry point is built and loaded properly.
270272

271273
## Extensibility Feedback
272274

0 commit comments

Comments
 (0)