-2

I am developing an application on asp.net mvc 5. In my application I have used a tinyMCE text editor.Problem is that I need to embed a logo as email signature. But I don't know how to do that. Can anyone help me in this regards ? Thanks in advance

2 Answers2

0

Host the logo then use the full url to it:

<textarea id="myTinyMceEditor">
    <br/>
    <br/>
    <hr/>
    Regards,<br/>
    Some Person
    <br/>
    <br/>
    <img src="http://www.example.com/full/url/to/logo.png" alt=""/>
</textarea>

Then init TinyMCE on #myTinyMceEditor and it will be pre-loaded with your signature

zanderwar
  • 3,440
  • 3
  • 28
  • 46
  • image will not be sent out – coder771 Sep 15 '16 at 15:50
  • 1
    if the image is stored internally. And site is not available externally. in emails it wont be visible – coder771 Sep 16 '16 at 08:53
  • That's a whole lot of speculation for something that can be just uploaded to imgur. Feel free to be **useful** and provide an answer that attaches the image as base64 and references it inline. Or don't be useful and comment here again. Either way stop bumping a 5month old post and smile :) – zanderwar Sep 19 '16 at 05:26
  • i'm not bumping into it, i'm working on it now, and the solution didn't seem to be helpful. To be helpful to others i have gone with adding image to cid in img tag and then add as linked resource in alternate view – coder771 Sep 20 '16 at 09:13
-1

There is an API for inserting content into the editor at the current cursor position insertContent():

https://www.tinymce.com/docs/api/class/tinymce.editor/#insertcontent

You can also use the setContent() API to replace the current editor's content with completely new content:

https://www.tinymce.com/docs/api/class/tinymce.editor/#setcontent

One of these should meet your needs.

Michael Fromin
  • 13,131
  • 2
  • 20
  • 31