Ticket #583: justifydirection.patch

File justifydirection.patch, 1.1 KB (added by Richard Lovejoy <xinha@…>, 14 years ago)
  • htmlarea.js

    diff -ur xinha-nightly/htmlarea.js xinha-new/htmlarea.js
    old new  
    267267  //  an you say that the internal represenattion of that should be http://your.server/ 
    268268  this.specialReplacements = { }; // { 'external_string' : 'internal_string' } 
    269269 
     270  // set this to true if you want to explicitly right-justify when  
     271  // setting the text direction to right-to-left 
     272  this.changeJustifyWithDirection = false; 
     273 
    270274  // set to true if you want Word code to be cleaned upon Paste 
    271275  this.killWordOnPaste = true; 
    272276 
     
    35393543      case "lefttoright": 
    35403544      case "righttoleft": 
    35413545    var dir = (cmdID == "righttoleft") ? "rtl" : "ltr"; 
     3546    if (this.config.changeJustifyWithDirection) { 
     3547      var justify = (cmdID == "righttoleft") ? "justifyright" : "justifyleft"; 
     3548      this._doc.execCommand(justify, UI, param); 
     3549    } 
     3550 
    35423551    var el = this.getParentElement(); 
    35433552    while (el && !HTMLArea.isBlockElement(el)) 
    35443553      el = el.parentNode;