How to disable First letter capitalization in RadEditor control in asp.net webform - html

I am trying to edit the html formatted string in RadEditor control. Its a simple
<table style="width: 100%; font-family: Verdana;">
<tbody>
<tr> <td>a</td></tr>
<tr> <td>b</td></tr>
<tr> <td>c</td></tr>
</tbody> </table>
but while debugging, the out put of RadEditor in code behind is like :
<Table Style="Width: 100%; Font-Family: Verdana;">
<Tbody>
<Tr><Td>A</Td></Tr>
<Tr> <Td>B</Td></Tr>
<Tr> <Td>C</Td></Tr>
</Tbody></Table>
it making each first character Capital. Is there any mode to set ?
Following is my aspx code to render :
<telerik:RadEditor ID="editorBody" Runat="server" Skin="WebBlue" ContentAreaCssFile="~/css/EditorContentAreaStyles.css" BackColor="White" EnableResize="False" Height="600px" >
<CssFiles>
<telerik:EditorCssFile Value="~/css/EditorCSSToApply.css" />
</CssFiles>
<Content>
</Content>
</telerik:RadEditor>
Same code working fine in another form.

Related

Freemarker Not Letting Me Set Font

A couple of months ago this application I wrote stopped rendering pdf correctly.
Everything used to work great with primefaces extensions pe:documentViewer.
I dont know what changed but now if I try and set the font, nothing renders in the popup.
If I remove the font-family:Courier, monospace; it renders...
This is my FTL template
<#ftl output_format="XML" auto_esc=true>
<#include '/base_macros.ftl'>
<div style="font-family:Courier, monospace; font-size: 14px;">
<#-- <table>
<tr>
<td>
<h1>${header!}</h1>
</td>
</tr>
</table>-->
<table>
<#list portDataList as portData>
<tr>
<td style="white-space: pre-wrap;">${portData.data!}</td>
</tr>
</#list>
</table>
</div>
F12'd Popup Code

HTML signature in gmail - weird space

I'm trying to make a signature for email (Lotus Notes). However, while it looks fine on Lotus (yay) I'm getting this space between the title and email address on Gmail.
And I have no idea why that is.
Picture of how it looks on Lotus Notes:
And how it looks on gmail:
Here link to a Fiddle Doesn't work properly as it does on email (don't know why):
<table border="0" cellpadding="6" cellspacing="0">
<tr align="left">
<td valign="top" width="100" ><img src="https://i.imgur.com/XCyNdd6.png" alt="logo" ></td>
<td valign="top" width="700" ><strong><span style=" display:table;font-family: Arial; font-size: medium; "><font size="3" face="Arial">John Doe Smith</font></span></strong>
<table align="left" width="100%" cellpadding="2", cellspacing="0">
<tr >
<td><span style="display:table; font-size:small; margin-top:0px; text-decoration:none; font-family: Arial; color:#16161D;"><font size="2" face="Arial" color="#16161D">https:/URL-example.eu</font></span></td>
</tr>
<tr >
<td><span style=" display:table; font-size: small; text-decoration:none; font-family: Arial;"><font size="2" face="Arial" color="#16161D";>email#URL-example.eu</font></span></td>
</tr>
</table>
<table align="left" width="100" cellpadding="2", cellspacing="" >
<tr align="left">
<td width="30"><img src="https://i.imgur.com/f6DwyDA.png" alt="Example Name Facebook Account"></td>
<td width="35"><img src="https://i.imgur.com/BDQERsI.png" alt="Example Name Instagram Account"></td>
<td width="50"><img src="https://i.imgur.com/Xx1atey.png" alt=Example Name Twitter Account"></td>
</tr>
</table>
</td>
</tr>
</table>
Thank you for all your help.
It probably has to do with how you're adding the signature in Gmail.
The simplest method is to open your HTML + CSS in a webpage (you can even use the Stack Snippet you shared just full screen it) and hit ctrl/cmd + A to select all the content on the page it should highlight all in blue including images. Then hit ctrl/cmd + C to copy it to clipboard and just paste it into the signature field in Gmail. Your code works fine if you do the above.
I couldn't replicate this in a Gmail test. Should be fine - but check #JHeth's answer.
Nevertheless, I also found a slight difference on Outlook iOS, as it added a line-height:150% to the <font> and <a> tags. There are often defaults like this, so it's best to always specify font-size and line-height for <font> and <p> and <a> tags, and there will also be colour and text-decoration defaults for <a>.
For block elements there are default margins and paddings.
So that's how you will get consistency, by adding a HTML-email equivalent CSS reset (note it has to be inline like you've done here, as opposed to <style>).

Unwanted space in row table for signature html

I'm making an email signature for my boss. So I upload the signature in my website and make him copy it and just paste it in his MS Outlook. In the html the signature looks fine when I try to test it, it also looks fine BUT when he's pasting it in his Outlook there's this unwanted space between the image and the text.
Here's how it's supposed to look:
Here's how it's turning out on his:
Here's my code:
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-size:12px;
font-family: Arial;
}
/*table, td, th {
border: 1px solid black;
}*/
table {
width: 580px;
}
th {
text-align: left;
}
p {
font-size:10px;
}
</style>
</head>
<body>
<h2>Highlight + Copy + Paste</h2>
<table cellpading="0" cellspacing="0">
<tr>
<td rowspan="5" width="194px"><img style="display:block; border-collapse:collapse;" src="image.png"></td>
<td colspan="2" style="font-size:18px; padding:5px"><b>Name</b><br>
<span style="font-size:12px"><i>V.P. of Business Development</i></span></td>
</tr>
<tr>
<td width="150px" style="padding:5px;"><img src="http://i795.photobucket.com/albums/yy239/spacebitss/phone.jpg">+000000000</td>
<td><img src="http://i795.photobucket.com/albums/yy239/spacebitss/fax.jpg"> +000000000</td>
</tr>
<tr>
<td style="padding:5px;"><img src="http://i795.photobucket.com/albums/yy239/spacebitss/mail.jpg"> email</td>
<td><img src="http://i795.photobucket.com/albums/yy239/spacebitss/cell.jpg"> +000000000</td>
</tr>
<tr>
<td style="padding:5px;"><img src="http://i795.photobucket.com/albums/yy239/spacebitss/skype.jpg"> skype</td>
<td><img src="http://i795.photobucket.com/albums/yy239/spacebitss/web.jpg"> website</td>
</tr>
<tr style="padding:5px;">
<td colspan="2"><img src="http://i795.photobucket.com/albums/yy239/spacebitss/add.jpg"> address </td>
</tr>
</tr>
<tr>
<td colspan="3"><p style="color:gray;">This message is only for the use of the person(s) for whom it is intended. It may contain confidential information.<br>
The unauthorized use, copying, distribution, or disclosure of this e-mail or any of its contents by anyone other than the intended recipient is unauthorized and unlawful.
If you have received this e-mail in error, please notify the sender immediately and destroy all copies of this transmission.
Thank you. <br> <span style="color:green; font-size:11px;"><img src="http://i795.photobucket.com/albums/yy239/spacebitss/tree.png"> Please think of the environment before you consider printing this e-mail</span></p>
</td>
</tr>
</table>
The code you provided is :
Duplicated (you have the same signature twice).
Contains non-standard attributes.
Contains non standard attribute values.
In other word, I doubt anyone will attempt to fix this code for you. What I would suggest is that you start from scratch using tools such as this:
https://www.exclaimer.ca/email-signature-creator/
https://htmlsig.com/
Etc.

How to restrict base tag to certain hyperlinks

I am using a base tag with an iframe tag and I would like to know how I can restrict certain links that open in the iframe.
e.g I have a menu panel and when clicked on menu link that desired page is displayed in the iframe.
<div class="start">
<h1 class="start">Geek Box <img src="box_icon.png" alt="Box width=" 40" height="40"></h1>
<hr />
</div>
<div class="table">
<table class="table" border="1" align="center">
<tr>
<td>
Home
</td>
<td>Tech Charts</td>
<td>Videos</td>
<td>About Me</td>
</tr>
</table>
</div>
<hr />
<br />
<div>
<table border="1" width=100% height="500px" style="text-align:center">
<tr>
<td width="25%">Smart Phones</td>
<td width="25%">Laptops</td>
<td width="25%">Dektops</td>
<td width="25%">Tablets</td>
</tr>
<base target='display' />
<tr><td colspan="4"><iframe name="display" frameborder=0 width="100%" height="500px" /> </td></tr>
</table>
</div>
If I understand correctly, you would like some of the pages to open in the iframe, and others in either the same window or another one (or whatever other way), ie. not in the iftame.
This won't work with the base tag using your example because...
The HTML <base> element specifies the base URL to use for all relative URLs contained within a document.
...and also
There can be only one <base> element in a document.
...so using another base tag would not make it work the way you want it.
Instead you'll have to get rid of the base tag, and add the target attribute to each of those links that you want to appear in the iframe.
So assuming you would like to open only the "sub-menus" (so they seem at least, ie. phone, laptop... etc) in the iframe, this is what I suggest you change your code to:
<div>
<table border="1" width=100% height="500px" style="text-align:center">
<tr>
<td width="25%"><a href="phone.html" target='display'>Smart Phones</a></td>
<td width="25%"><a href="laptop.html" target='display'>Laptops</a></td>
<td width="25%"><a href="Desktop.html" target='display'>Dektops</a></td>
<td width="25%"><a href="Tablets.html" target='display'>Tablets</a></td>
</tr>
<!-- Notice I have removed the 'base' tag! -->
<tr><td colspan="4"><iframe name="display" frameborder=0 width="100%" height="500px" /> </td></tr>
</table>
</div>
...and you can leave the rest of your code intact.
Quoted source: <base - HTML | MDN

Using a variable in HTML without Javascript

I have this HTML code:
<body>
<table width="650">
<tr width="650">
<td width="650">
lots of text here
</td>
</tr>
</table>
</body>
How can I use a variable/constant to represent 650? Do I need to use javascript or something?
What I really want is a way to reuse some code so that I only need to change the width value in one place.
Nb. I'm not using a database or anything. Just a simple html page, so I'd like to do something like:
int x = 650
Using css:
table,tr,td{width:650px;}
CSS
table, tr, td {
width: 650px;
}
HTML
<body>
<table>
<tr>
<td>
lots of text here
</td>
</tr>
</table>
</body>