Asset picker
Implement FileManager.open(options). Return one asset with a safe URL, or null when cancelled. The CMS host owns the picker; it is not part of editor Core.
Register it per instance using fileManagerServiceToken. Start selection through the image picker control or media.browse; commands insert accepted results.
Uploading and choosing an existing asset are independent capabilities and can use separate services.
Checked code
export function registerPicker(editor: ClassicEditor, picker: FileManager) {
editor.editor.services.register(fileManagerServiceToken, picker);
}Checked against the published types; see imports and types for imports.
Enable asset commands
export async function createAssetEditor(host: HTMLElement) {
return createOptionalEditor(host, {
plugins: [...cmsRuntimePreset.plugins, FileManagerPlugin, UploadPlugin],
toolbar: [
'undo',
'redo',
'bold',
'italic',
'image-browse',
'file-link',
],
});
}Add FileManagerPlugin during creation before registering the service below. Return null on cancellation; existing content should remain unchanged.
Common errors
media.browse is unavailable if only the service is registered. Return an accessible asset URL, not a local filesystem path from the host machine.
Next steps
Examples · Configuration · Troubleshooting
Our best companion: SoFinder
SoFinder is our recommended asset management companion. See the integration guide and example for image, file and video URL workflows, and how the simulated picker differs from a real backend.