0
I’m implementing a system that manages a file. gif with the client’s email signature, with the properties: name, sector, phone, extension and email. The only problem so far is styling each property separately. The name property has a different font size and sector property for example. What tips do you give me to style each property? Thank you in advance !
index.html
var form = $('#oi');
var nome = form.find('input[name="nome"]').val();
$(document).ready(function(){
var canvas = $("#myCanvas")[0];
var context = canvas.getContext("2d");
var imageObj = new Image();
imageObj.onload = function(){
context.drawImage(imageObj, 10, 10);
context.font = "20px Arial bold";
context.fillStyle = '#006400';
imageObj.setAttribute('crossOrigin', 'anonymous');
context.fillText(nome, 243, 65);
context.fillText("Estagiário de Desenvolvimento", 243, 85);
context.fillText("(85) 000-000", 240, 125);
context.fillText("|", 380, 125);
context.fillText("Ramal", 390,125 );
context.fillText("[email protected]", 243, 145);
};
imageObj.src = "ASSINATURA-BG.png";
});
You want answer in Jquery or pure Javascript?
– Maury Developer
Can be in jquery !
– Moises Abreu
Do you want clean and functional code? It leaves style for each one.
– Maury Developer