Plug-in Development Specifications
Overview
"Plug-ins" are packaged JavaScript and CSS customizations for Kintone Apps.
Kintone allows users to install plug-ins to expand on functionality of Apps via JavaScript. When enhancing Apps with JavaScript, users need to update and re-upload their JavaScript files when making updates to their customization. Plug-ins however allow users to make updates to the customization via the plug-in settings page.
This article explains the specifications for plug-in development.
Files That Can Be Packaged
The following files can be included for the development of the plug-in. The *
indicates the required files.
|
|
Image Files
icon.png
The icon image for the Plug-in.
- This file is required.
- The following file types can be set: png, jpg, gif, bmp
- The maximum file size is 20MB.
JavaScript Files
customize.js
The JavaScript file that runs on desktop browsers. This is where the main Kintone customization codes are written.
- The file can use data stored in the Plug-in Settings page.
- The maximum file size is 20MB.
Note
kintone.plugin.app.getConfig()
can be used to retrieve data stored in the Plug-in Settings page. This data needs to be initially set by the config.js
file using kintone.plugin.app.setConfig()
.
Note
Developers are advised to write their code within the following immediately invoked function expression.
|
|
This ensures that the JavaScript code will use the settings of its related plug-in, even when there are multiple plug-ins added to the Kintone App.
mobile-customize.js
The JavaScript file that runs on mobile browsers.
- This file is optional, and can be ignored.
- The maximum file size is 20MB.
config.js
The JavaScript file that creates the settings page of the Plug-in.
- This file is optional, and can be ignored.
- The maximum file size is 20MB.
kintone.plugin.app.setConfig()
is used to save variables to the plug-in.
CSS Files
customize.css
The CSS file that runs on Desktop browsers.
- This file is optional, and can be ignored.
- The maximum file size is 20MB.
Note
To use the Kintone design, follow the guide in the following article:
Plug-in Stylesheet Guide
mobile-customize.css
The CSS file that runs on mobile browsers.
- This file is optional, and can be ignored.
- The maximum file size is 20MB.
config.css
The stylesheet that runs on the settings page of the Plug-in.
- This file is optional, and can be ignored.
- The maximum file size is 20MB.
Note
To use the Kintone design, follow the guide in the following article:
Kintone stylesheet
HTML Files
config.html
The HTML file that displays the settings of the Plug-in, on the Plug-in Settings page.
- This file is optional, and can be ignored.
- The maximum file size is 64KB.
The Manifest File
The manifest file stores various parameters for the plug-in, and is a required file.
Manifest file format
The manifest file format is as below. Specify each parameter in a JSON format.
PARAMETER | TYPE | REQUIRED | DETAILS |
---|---|---|---|
manifest_version | Integer | Yes | The manifest version of the plug-in. Specify the integer 1 . |
version | Integer or String | Yes | The plug-in version. |
type | String | Yes | The type of the plug-in. Specify the string APP . |
name | Object | Yes | An object including data of localized plug-in names. The following language codes can be specified:en : Englishja : Japanesezh : Simplified Chinesees : Spanish |
name.<locale> | String | Yes | The localized name of the plug-in. Must be between 1 to 64 characters. name.en is required. |
description | String | Optional | An object including data of localized plug-in descriptions. The following language codes can be specified:en : Englishja : Japanesezh : Simplified Chinesees : Spanish |
description.<locale> | String | Yes | The localized description of the plug-in. Must be between 1 to 200 characters. description.en is required. |
icon | String | Yes | The plug-in icon file. Only files within the plug-in can be specified. |
homepage_url | Object | Optional | An object including data of website links for various Locales. The following language codes can be specified:en : Englishja : Japanesezh : Simplified Chinesees : SpanishThe icon is only displayed if the specified locale matches the locale in the name parameter. |
homepage_url.<locale> | String | Optional | The website link of the plug-in for the user's locale. |
desktop | Object | Optional | The JavaScript and CSS files for the Desktop. |
desktop.js | Array of Strings | Optional | An array of JavaScript file URLs for the Desktop. Up to 30 files can be set. If multiple files have the same name, an error will occur. |
desktop.css | Array of Strings | Optional | An array of CSS file URLs for the Desktop. Up to 30 files can be set. If multiple files have the same name, an error will occur. |
mobile | Object | Optional | The JavaScript and CSS files for the mobile. |
mobile.js | Array of Strings | Optional | An array of JavaScript file URLs for the Mobile. Up to 30 files can be set. If multiple files have the same name, an error will occur |
mobile.css | Array of Strings | Optional | An array of CSS file URLs for the Mobile. Up to 30 files can be set. If multiple files have the same name, an error will occur. |
config | Object | Optional | The HTML, JavaScript and CSS files for the Plug-in Settings page. |
config.html | String | Optional | The HTML file for the Plug-in Settings page. Only files within the plug-in can be specified. |
config.js | Array of Strings | Optional | An array of JavaScript file URLs for the Plug-in Settings page. Up to 30 files can be set. If multiple files have the same name, an error will occur. |
config.css | Array of Strings | Optional | An array of CSS file URLs for the Plug-in Settings page. Up to 30 files can be set. If multiple files have the same name, an error will occur. |
config.required_params | Array of Strings | Optional | An array of key names for the required fields in the Plug-in Settings page. Must be between 1 to 64 ASCII characters. |
Manifest file sample
|
|
Packaging Plug-in Files
Once the files are ready, the Plugin-packer tool is used to package the customization. Read through the following article for steps on how to use the plug-in packer tool.
Package Plug-in Files using plugin-packer