Ticket #861 (closed New Feature: duplicate)

Opened 7 years ago

Last modified 6 years ago

Background color for tables

Reported by: anonymous Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: SF Cc: simpleupdates@…

Description

I would like to have the background color option for whole tables, not only cells. The editor will really suck if that option is not supported because most browsers support colors in tables.

If the style of the tables should be set with CSS classes then the whole thing will be a mess! I don't know why you should make things difficult to use if there is an easy way to do it.


Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1414896&group_id=75348&atid=543656

Change History

comment:1 Changed 7 years ago by martinkou

  • Cc simpleupdates@… added
  • Reporter changed from martinkou to anonymous

I would also like this capability!


Moved from SF. Original poster: simpleupdate

comment:2 Changed 7 years ago by timnbron

I copied the code from the table cell dialog, and it appears to work. Any reason why this can't be put in the next release?

Yes, I accept it should use separate fcklang codes from the cell dialog, although the words are the same.

Patched fck_table.html (2.4.3, build 15657) as below: (the indenting gets lost in transit)

83a84,85

document.getElementById('txtBackColor').value = GetAttribute( table, 'bgColor' ) ; document.getElementById('txtBorderColor').value = GetAttribute( table, 'borderColor' ) ;

118a121,122

SetAttribute( table, 'bgColor' , GetE('txtBackColor').value ) ; SetAttribute( table, 'borderColor' , GetE('txtBorderColor').value ) ;

163a168,183

function SelectBackColor( color ) {

if ( color && color.length > 0 )

GetE('txtBackColor').value = color ;

}

function SelectBorderColor( color ) {

if ( color && color.length > 0 )

GetE('txtBorderColor').value = color ;

}

function SelectColor( wich ) {

oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, wich == 'Back' ? SelectBackColor : SelectBorderColor, window ) ;

}

212a233,238

<tr>

<td>

&nbsp;</td>

<td>

&nbsp;</td>

</tr>

266a293,318

</tr>

</table> <table cellspacing="0" cellpadding="0" border="0">

<tr>

<td nowrap="nowrap">

<span fcklang="DlgCellBackColor">Background Color</span>:</td>

<td>

&nbsp;<input id="txtBackColor" type="text" size="8" name="txtCellSpacing"></td>

<td>

&nbsp; <input type="button" fcklang="DlgCellBtnSelect" value="Select..." onclick="SelectColor( 'Back' )"></td>

</tr> <tr>

<td nowrap="nowrap">

<span fcklang="DlgCellBorderColor">Border Color</span>:</td>

<td>

&nbsp;<input id="txtBorderColor" type="text" size="8" name="txtCellPadding" /></td>

<td>

&nbsp; <input type="button" fcklang="DlgCellBtnSelect" value="Select..." onclick="SelectColor( 'Border' )" /></td>

</tr> <tr>

<td>

&nbsp;</td>

<td>

&nbsp;</td>

comment:3 Changed 6 years ago by w.olchawa

  • Status changed from new to closed
  • Resolution set to duplicate

DUP of #595

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy