Customize Menu Items
PhotoEditor SDK supports changing the menu items used in the editor UI.
The tool menu items displayed in the main menu can be configured through the configuration.tools
option and takes an array of Tool
s.
You can find a list of all available tools here.
Note that items for tools not included in your license subscription will be hidden automatically.
import { Configuration, PESDK, Tool } from "react-native-photoeditorsdk";
export const openPhotoFromLocalPathExample = async (): Promise<void> => {
const photo = require("../../../../../assets/pesdk/LA.jpg");
try {
const configuration: Configuration = {
tools: [
Tool.ADJUSTMENT,
Tool.AUDIO,
Tool.BRUSH,
Tool.COMPOSITION,
Tool.FILTER,
Tool.FOCUS,
Tool.FRAME,
Tool.OVERLAY,
Tool.STICKER,
Tool.TEXT,
Tool.TEXT_DESIGN,
Tool.TRANSFORM,
Tool.TRIM,
],
};
const result = await PESDK.openEditor(photo, configuration);
if (result != null) {
console.log(result.image);
} else {
return;
}
} catch (error) {
console.log(error);
}
};