Inspector
This article will explain the basic concepts of the inspector plugin.
Note: The inspector plugin requires Eagle version 4.0 Beta 17 or above.
You can develop an additional inspector tool for specific file formats. When a user selects a file of that format, they can directly use the plugin in the inspector on the right side. For example, an EXIF attribute inspector plugin can be developed for JPG/Raw files, allowing users to easily view additional data such as "shooting time, focal length, aperture, latitude and longitude" on the right side when they select such files.
The inspector plugin is actually a variant of the format extension plugin, and its definition method is very similar. The inspector plugin does not need to define the main
attribute in manifest.json
, but needs to set the preview
attribute. Below is an example code:
In preview
, you can define the file extensions you want to extend. For example, if you want to develop an additional plugin for jpg and png formats, you can enter "jpg,png": {}
:
Then set the following properties:
path
: The path to the HTML file of the pluginheight
: The default height of the pluginmultiSelect
: Whether to display when multiple selections are made (it is recommended to set tofalse
unless in special cases)
After setting other fields in metadata.json
, the final code is as follows:
Complete example code: https://github.com/eagle-app/eagle-plugin-examples/tree/main/Inspector
How to Debug Inspector Plugins
Debugging inspector plugins is simple. You can right-click on the inspector plugin in the screen and then select "Developer Tools" to start debugging.
Last updated