Editors
Editors are pages used to edit elements in the project. They're connected to a Creator and Element Type. This gives you the option to create custom editors and new content in Nexo Ma
Registration (main.js)
api.nexomaker.registerEditorType(editorId, componentPath, metadata)
api.nexomaker.registerEditorType(editorId, componentPath, metadata)Parameter
Type
Required
Description
Property
Type
Description
module.exports.init = async () => {
// Register the custom editor
api.nexomaker.registerEditorType(
'armor_editor',
__dirname + '/editors/ArmorEditor.jsx', // Use __dirname + string concatenation (NOT path.join)
{
label: 'Armor Editor',
description: 'Edit armor pieces with custom stats'
}
);
};Mapping Types to Editors (main.js)
api.nexomaker.setEditorForType(elementType, editorId)
api.nexomaker.setEditorForType(elementType, editorId)Parameter
Type
Description
Editor Component Structure (.jsx file)
Function Signature
Best Practices
1. No Imports - Use Props
2. Always Show Loading States
3. Handle Missing Data Gracefully
4. Validate Before Saving
5. Provide User Feedback
6. Use Scoped Logging
7. Update Content Array After Save
Advanced Patterns
Auto-Save
Multi-Section Form
Undo/Redo Support
Debugging
Check itemData Structure
Verify Save Calls
Last updated