0

my plugin selectImage in Component: GrapeComponent.ts

selectImage(editor:any) {
        
        editor.BlockManager.add('select-image', {
            label: 'Image',
            category: 'Basic',
            activate: true,
            select: true,
            attributes: { class: 'fa fa-picture-o' },
            content: 
           {
                type: "image",
           },
           
        });
       
    
    }

i try : create injector.

my injector( i use Angular) in Component: appComponent.ts

constructor(injector: Injector) 
   {customElements.define('select-image', createCustomElement(SelectImageComponen{injector}));}

and

   selectImage(editor:any) {
        
        editor.BlockManager.add('select-image', {
            label: 'Image',
            category: 'Basic',
            activate: true,
            select: true,
            attributes: { class: 'fa fa-picture-o' },
            content:  `<select-image></select-image`
        });
    }

I have called so that it can render to my Select-image component, but it doesn't seem feasible as the image is not displayed in the canvas.So i want to change default Asset Manager to SelectImageComponent.

Could you help me? Is there a way to change the default asset manager to my own custom component? I already have a component that contains my image API. I want to use it instead of the AssetManager.

Thank You So Much !!!

0 Answers0