roundcube / roundcubemail

The Roundcube Webmail suite
https://roundcube.net
GNU General Public License v3.0
5.81k stars 1.63k forks source link

Signature does not show when HTML composing is on by default #1725

Closed rcubetrac closed 16 years ago

rcubetrac commented 16 years ago

Reported by rosali on 27 Aug 2008 14:17 UTC as Trac ticket #1485297

...

to fix it add in editor.js to tiny init:

oninit : "change_identity",

and add javascript code ...

function change_identity(){ rcmail.change_identity(document.getElementById("rcmcomposefrom")); }


A further problem in IE 7 occurs if you are replying a message which contains a RoundCube signature (...). IE throws an error when trying to change the identity.

To fix this a have edited app.js ... case send (around line 888):

  case 'send':
    if (!this.gui_objects.messageform)
      break;

    if (!this.check_compose_input())
      break;

    // Reset the auto-save timer
    self.clearTimeout(this.save_timer);

    // Find me: ...
    // Remove signature id "_rc_sig" --- Start
    tinyMCE.triggerSave();

    var body = document.getElementById("compose-body").value;

    if(body)
      {

      body = body.replace(/_rc_sig/g,"");

      document.getElementById("compose-body").value = body;

      }

      tinyMCE.get("compose-body").setContent(body);
    // Remove signature id "_rc_sig" --- End

Migrated-From: http://trac.roundcube.net/ticket/1485297

rcubetrac commented 16 years ago

Milestone changed by @alecpl on 28 Aug 2008 06:47 UTC

later => 0.2-beta

rcubetrac commented 16 years ago

Comment by rosali on 28 Aug 2008 08:05 UTC

oops ... if you adapt my code, please do not miss to check tinyMCE object. Otherwise there are JS error when sending plain text messages!

rcubetrac commented 16 years ago

Comment by rosali on 29 Aug 2008 12:27 UTC

Since you have embedded signature into a div instead of span tags, no javascript error is thrown anymore. Nethertheless I suggest to remove the signature id on sending the message. Otherwise there is no signature added on replied or forwarded messages if they already contain any RoundCube signature.

rcubetrac commented 16 years ago

Comment by @alecpl on 29 Aug 2008 13:19 UTC

Fixed in 940fc136.

rcubetrac commented 16 years ago

Status changed by @alecpl on 29 Aug 2008 13:19 UTC

new => closed