I'm having a problem including a base64 image using tinymce.activeEditor.execCommand('mceInsertContent',
The following works:
tinymce.activeEditor.execCommand("mceInsertContent", true, "<img style = 'height:80px;width:80px' src='/Content/image.png' />");`
tinymce.activeEditor.execCommand("mceInsertContent", true, "<div>safasfdasfd</div>");
But when using tinymce.activeEditor.execCommand('mceInsertContent', true, img64);
where img64
is a base64
image received from a MVC partial view converted to string.
Does someone have a working example. I don't know if the syntax is wrong or if there is some option I have forgotten?
Update:
The following do not work:
tinymce.activeEditor.execCommand("mceInsertContent", true, "<img style='height:80px;width:80px' src='data:image/png;base64,/some long 64 string is here'>");
Does anyone know why this is not working? Some help would be greatly appreciated.