You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have to add width="" and height="" to each IMG element after I have converted the emoji tags to images with emojione.toImage(value) , since the standard size does not fit, and unfortunately, in this case, img.emojione {width: 20px !important; height: 20px !important;} (testet) has no effect since I have to use the output HTML in an HTML e-mail that should be viewable in Outlook.
Here is my code:
$("#UserSpecificMessageText").change(function () { //INPUT FIELD WITH EMOJIONEAREA //
var value = $(this).val();
value = emojione.toImage(value);
// HERE I NEED TO ADD WIDTH AND HEIGHT PROPERTY TO EACH IMG ELEMENT //
$("#UserSpecificMessageTextToEmail").val(value); // ANOTHER INPUT (HIDDEN) FIELD FOR FORM THAT SEND E-MAIL //
});
I have tried different variation of adding this property, but nothing works:
Examples of what I have tried:
value = $('.img').each(function(index) {
$(this).attr('width', '50px'); // This Returns [object object] that I can not convert back//
});
$(value).find(img).attr("width", "20").attr("height", "20"); // This gives me Uncaught TypeError: value.attr is not a function
$(value).find(img).width(20).height(20); // This gives me Uncaught TypeError: value.attr is not a function
value = value["attr"]("img","width='20'"); // This gives me Uncaught TypeError: value.attr is not a function
Maybe theres another way? Any help is appriciated :-)
The text was updated successfully, but these errors were encountered:
Hi,
I have to add
width=""
andheight=""
to each IMG element after I have converted the emoji tags to images withemojione.toImage(value)
, since the standard size does not fit, and unfortunately, in this case,img.emojione {width: 20px !important; height: 20px !important;}
(testet) has no effect since I have to use the output HTML in an HTML e-mail that should be viewable in Outlook.Here is my code:
I have tried different variation of adding this property, but nothing works:
Examples of what I have tried:
Maybe theres another way? Any help is appriciated :-)
The text was updated successfully, but these errors were encountered: