A
A
Alexander Verbitsky2020-02-06 15:50:58
JavaScript
Alexander Verbitsky, 2020-02-06 15:50:58

1. How to bind an event to ELFinder? 2. How to resize CKEditor print area?

I will immediately write two questions in one))

1. ELFinder is a conductor for loading images.

I need a java event to fire after selecting an image. Namely, somewhere near the button, the same image appeared (I’ll figure this out myself, of course).

The ELFinder documentation ( https://github.com/MihailDev/yii2-elfinder ) states that in order for the event to work, you need to write the following in web.php. the code:

'controllerMap' => [
        'elfinder' => [
            ...            
            'managerOptions' => [
                ...
                'handlers' => [
                    'select' => 'function(event, elfinderInstance) {
                                    console.log(event.data);
                                    console.log(event.data.selected);
                                }', 
                    'open' => 'function(event, elfinderInstance) {...}',
                ],
                ...
            ],
            ...
        ]
    ],


And so, registered, but any event after a choice of the image does not work... Can it in general not that??? How to do what I want?

2. How to change the width of the print area in CKEditor? So that even after scanning to full screen, the print area does not exceed the specified ??
5e3c0b727308f583888281.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question