By AntonVTR on
default we have add image button, it work perfect with IMCE. But use the lightbox not easy for user
we can modify the button to
php:
$imce_url = function_exists('imce_access') && imce_access() ? url('imce') : '';
return "js:
var B = eDefBrowseButton('$imce_url', 'attr_href', 'Browse', 'link');
var form = [
{name: 'href', title: 'Link URL', suffix: B},
{name: 'html', title: 'Link text'},
{name: 'title', title: 'Link title'},
{name: 'rel', title: 'Lightbox', type: 'select', options: {'': 'none', lightbox: 'lightbox'}, value: 'lightbox'}
];
eDefTagDialog('a', form, 'Insert/edit link', 'OK');
";
this button generate the link like <a href="img_link"></a>
but need the <a href="img_link"><img src="img_link" width="100" height="100" alt="img_link"></a>
How I can manipulate with {name: 'html' }
Please help me.