The file browser for EE is good, but theres no easy way I could see to integrate it into tinyMCE.
For the moment working with what we have i dug around and found where the <figure> is being added:
expressionengine/rte_tools/rte.images.js around line 75
var $img = $('<figure>')
.css('text-align','center')
.append(
$('<img alt="">')
.attr('src', image_object.thumb.replace(/_thumbs\//, ''))
);
If you know JQuery you should be able to tailor this to you needs. I have simply adjusted it to read
var $img = $('<img alt="">')
.attr('src', image_object.thumb.replace(/_thumbs\//, ''));
Also the caption text needs to be taken care of.
if ((caption_text = prompt(EE_rte_image.caption_text, '')))
{
$img.append(
$('<figcaption>').text(caption_text)
)
.find('img').attr('alt', caption_text);
}
As my <img> is not wrapped in any tags the caption text is only going to show in my alt. So I adjusted the code to:
if ((caption_text = prompt(EE_rte_image.caption_text, '')))
{
$img.attr('alt', caption_text);
}
Make sure you have a backup of the original. And please bear in mind this is a temp fix as it will disable the overlay which allows the image formatting. Hope this helps.
Now to tackle the br issue…Excelsior.lol!