<p>Hello, World!</p> <textarea rows="10" cols="50"> Type your secret coded message here... var myFont = "Verdana" //this should be the standard font to start with //This function will change your html font & text function changeFont(YourText) { $w("#txtStyle").html = '<span style="font-family: 'Code G';">'+YourText+'</span>' } //This function you will need to change the font when you click on a button function changeFontName(fontName){ myFont =fontName $w("#txtStyle").html = '<span style="font-family: 'Code G';">'+$w("#textBox1").value +'</span>' } //This function is your onClick (to change your font) export function btnChangeFont_click(event) { changeFontName(event.target.label) } //This will be used when typing export function textBox1_input(event) { changeFont(event.target.value) } </textarea>
<textarea rows="10" cols="50"> Type your secret coded message here... input[type="text"], textarea { font-family: 'Code G', sans-serif; font-size: 16px; /* Customize the font size */ padding: 10px; border: 1px solid #ccc; border-radius: 5px; }
