Opened 15 years ago

Closed 14 years ago

#570 closed enhancement (fixed)

RFC: Clicking alignment button when image selected should set image align="" attribute

Reported by: gogo Owned by: gogo
Priority: high Milestone:
Component: Plugin_ContextMenu Version: trunk
Severity: normal Keywords:

Description (last modified by gogo)

The is a request for comment on a change I think is useful for the core, but changes behaviour slightly.

Currently, if you select an image in the Xinha area, and click left/right then the entire paragraph the image is in is left/right justified.

The change makes it so that the image has it's align="" attribute set to left/right (so that text flows around the right/left of the image). Clicking the same justification button again removes the align="" attribute.

The advantage of this is simply that it seems more intuitive, if you select an image and click the alignment button then the image is aligned, not surrounding text. It also gives functionality which is not available presently without opening one of the image dialogs.

The change is a simple addition to the switch in execCommand()

    case 'justifyleft'  :
    case 'justifyright' :
      var ae = this._activeElement(this._getSelection());      
      if(ae && ae.tagName.toLowerCase() == 'img')
        ae.align = ae.align == RegExp.$1 ? '' : RegExp.$1;
        this._doc.execCommand(cmdID, UI, param);

Center alignment is a bit more tricky, probably clicking center would have to add something like style="clear:both;display:block;margin-left:auto;margin-right:auto;" or something to get an "expected" behaviour (well, if HTML supported it then it would truely be centered with text flow on both left and right, but we don't have that option). Unfortunatly that CSS only works in Gecko, I can't find a way to get IE to center an image short of wrapping it in a div or something.

Change History (4)

comment:1 Changed 15 years ago by gogo

  • Description modified (diff)

comment:2 Changed 15 years ago by wymsy

I like the idea - I agree it seems more intuitive, and it's quicker. As for center and justify, I haven't thought this through, but would it make sense to just remove the align attribute in those two cases if it is set to left ot right?

comment:3 Changed 15 years ago by ZsKXnUSTCv

  • Component changed from Xinha Core to Plugin_ContextMenu
  • Milestone Version 1.0 deleted
  • Priority changed from normal to high
  • Version set to trunk

<a href=''> - non nude asian models </a>
<a href=''> - shemale movie hut </a>
<a href=''> - sexy bbw pic </a>
<a href=''> - mature sex thumbs free </a>
<a href=''> - ebony oral cum shots </a>
<a href=''> - free hermaphrodite xxx pictures </a>
<a href=''> - tranny manual np </a>
<a href=''> - three fat chick </a>
<a href=''> - black cum shot </a>
<a href=''> - free group interracial pictures sex </a>
<a href=''> - mature ladies nude free </a>
<a href=''> - asian ladyboy xxx </a>
<a href=''> - chinese folktales </a>
<a href=''> - mature gay sex movies clips </a>
<a href=''> - asian porn movie site </a>
<a href=''> - spankman s nude older women </a>
<a href=''> - fat fat sex women </a>
<a href=''> - hot teen tease tits panties gallery </a>
<a href=''> - adele stephens interracial </a>
<a href=''> - japanese music </a>
<a href=''> - free fat mature mexican hardcore </a>
<a href=''> - chinese phrase book and sex </a>
<a href=''> - free movies of big tits </a>
<a href=''> - chinese chart for predicting sex of baby </a>
<a href=''> - mature model free thumbs </a>
<a href=''> - best asian porn sites </a>
<a href=''> - boob flick free </a>
<a href=''> - 40 year old she males </a>
<a href=''> - free mature xxx </a>
<a href=''> - hairy pussy bbw </a>
<a href=''> - mature xxx pictures </a>

WBR XfhqkwnYrbcTICaso

comment:4 Changed 14 years ago by gogo

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

No complaints, so changeset:666 (bad omen?).

Note: See TracTickets for help on using tickets.