General developer forum

Atto plugin triggering

 
Picture of Steffen Hippeli
Atto plugin triggering
Plugin developers

Hi, i am about to write an atto plugin for the edu-sharing activity - almost done.

The plugin inserts img an a tags to the textarea which are more or less placeholders that contain some metadata and will be replaced by real objects in the corresponding filter.

If one selects such a placeholder, the icon of my plugin is highlighted in the toolbar. I achieve that by setting the tags attribute in the initializer method. In addition the image respectively link plugin icon is highlighted in the toolbar.

Question:

Is there any solution to prevent the highlighting of the link/image plugin?


Thank you

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Atto plugin triggering
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

I would guess that this is not possible unless get make a change to standard Moodle image icon - which would be a perfectly reasonable thing to do. Your use of a preview image in the editor, then replace it with a filter seems like a really nice idea.

What I would suggest is that you add a class like 'not-user-editable-image' to the IMG tag, then submit a change to core Moodle so that in lib/editor/atto/plugins/image/yui/src/button/js/button.js, the CSS selectors all have :not(.not-user-editable-image) added. Or something like that. (Probably not the best CSS class name to use. An alternative class name might beatto_image-ignore.

 
Average of ratings: -
Picture of Steffen Hippeli
Re: Atto plugin triggering
Plugin developers

Thanks Tim, i will try that out.

 
Average of ratings: -