TinyPortal

Development => Support => Topic started by: feline on November 22, 2005, 11:46:49 PM

Title: Modification on rte_image.php
Post by: feline on November 22, 2005, 11:46:49 PM
Hi Bloc and all ..

a smal modifikation on rte_image.php gives a margin between pictures and text ...

insert before
    if ( isIE )
    {

this
    if (img_align.value == 'right')
    {
      var Border = 'style="margin:0px 0px 0px 4pxpx; border:' + img_border.value + 'px solid #000000;"';
    }
    else
    {
      var Border = 'style="margin:0px 4px 0px 0px; border:' + img_border.value + 'px solid #000000;"';
    }

and replace
    if ( isIE )
    {
        var img = imagePath + file + '" alt="' + file + '" title="' + file + '"' + align + Border + '>';
        window.opener.document.getElementById( rte ).contentWindow.document.execCommand( 'insertImage', false, img );
    }
    else
    {
        var img = '<img src="' + imagePath + file + '" alt="' + file +'" title="' + file + '"' + align + Border + '>';
        window.opener.document.getElementById( rte ).contentWindow.document.execCommand( 'insertHTML', false, img );
    }


Fel