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.
Is there any solution to prevent the highlighting of the link/image plugin?
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.