I am using Rad Editor version -2010.3.1109.35.
According to my client requirement i need to create font sizes in pts.
For this i have made below changes (I am adding the RadEditor through code)
1.)In ToolsFile by adding "RealFontSize"
<tools name="MainToolbar" enabled="true">
<tool name="Bold" />
<tool name="Italic" />
<tool name="Underline" />
<tool separator="true"/>
<tool name="FontName" />
<tool separator="true"/>
<tool name="RealFontSize" />
<tool separator="true"/>
<tool name="ForeColor" />
</tools>
<realFontSizes>
<item value="8pt"></item>
<item value="9pt"></item>
<item value="10pt"></item>
<item value="11pt"></item>
<item value="12pt"></item>
<item value="14pt"></item>
<item value="16pt"></item>
<item value="18pt"></item>
<item value="20pt"></item>
<item value="22pt"></item>
<item value="24pt"></item>
<item value="26pt"></item>
<item value="28pt"></item>
<item value="36pt"></item>
<item value="48pt"></item>
<item value="72pt"></item>
</realFontSizes>
2.)Added event txtRichTextEditor.OnClientSelectionChange = "OnClientSelectionChange";
To convert px to pts
function OnClientSelectionChange(editor, args) {
var tool = editor.getToolByName("RealFontSize");
if (tool) {
setTimeout(function () {
var toolval = tool.get_value();
if (toolval.indexOf("px") != -1) {
var pointval = Math.round(parseInt(toolval) * 0.75) + "pt";
tool.set_value(pointval);
}
}, 0);
}
}
3.)Content area css file
body
{
font-family: Arial !important;
font-size: 14px !important;
color: black !important;
background-color: white !important;
text-align: left !important;
}
blockquote
{
margin-left:40px !important;
margin-bottom:0px !important;
margin-right:0px !important;
margin-top:0px !important;
}
I have two issues here
1.)Font Size could not be selected beforehand in Chrome and Safari browsers
NOTE: Able to chage pts in mozilla and IE for the first time with out entering any text in RadEditor
2.)On selecting the font size for the first time and clicking in Text editor the Font Size is getting changed to 12 pt in FF browser and 11 pt in I.E 10 browser
Ex :- Say select the Font Size 22 pt for the first time and click in Text editor. Observed that the Font Size is getting changed to 12 pt/11pt
How can the two issues i have mentioned above be fixed?
How to achieve proper working of RealFontSizes(in pts) in all the browsers(IE,Mozilla,Chrome & Safari)?
According to my client requirement i need to create font sizes in pts.
For this i have made below changes (I am adding the RadEditor through code)
1.)In ToolsFile by adding "RealFontSize"
<tools name="MainToolbar" enabled="true">
<tool name="Bold" />
<tool name="Italic" />
<tool name="Underline" />
<tool separator="true"/>
<tool name="FontName" />
<tool separator="true"/>
<tool name="RealFontSize" />
<tool separator="true"/>
<tool name="ForeColor" />
</tools>
<realFontSizes>
<item value="8pt"></item>
<item value="9pt"></item>
<item value="10pt"></item>
<item value="11pt"></item>
<item value="12pt"></item>
<item value="14pt"></item>
<item value="16pt"></item>
<item value="18pt"></item>
<item value="20pt"></item>
<item value="22pt"></item>
<item value="24pt"></item>
<item value="26pt"></item>
<item value="28pt"></item>
<item value="36pt"></item>
<item value="48pt"></item>
<item value="72pt"></item>
</realFontSizes>
2.)Added event txtRichTextEditor.OnClientSelectionChange = "OnClientSelectionChange";
To convert px to pts
function OnClientSelectionChange(editor, args) {
var tool = editor.getToolByName("RealFontSize");
if (tool) {
setTimeout(function () {
var toolval = tool.get_value();
if (toolval.indexOf("px") != -1) {
var pointval = Math.round(parseInt(toolval) * 0.75) + "pt";
tool.set_value(pointval);
}
}, 0);
}
}
3.)Content area css file
body
{
font-family: Arial !important;
font-size: 14px !important;
color: black !important;
background-color: white !important;
text-align: left !important;
}
blockquote
{
margin-left:40px !important;
margin-bottom:0px !important;
margin-right:0px !important;
margin-top:0px !important;
}
I have two issues here
1.)Font Size could not be selected beforehand in Chrome and Safari browsers
NOTE: Able to chage pts in mozilla and IE for the first time with out entering any text in RadEditor
2.)On selecting the font size for the first time and clicking in Text editor the Font Size is getting changed to 12 pt in FF browser and 11 pt in I.E 10 browser
Ex :- Say select the Font Size 22 pt for the first time and click in Text editor. Observed that the Font Size is getting changed to 12 pt/11pt
How can the two issues i have mentioned above be fixed?
How to achieve proper working of RealFontSizes(in pts) in all the browsers(IE,Mozilla,Chrome & Safari)?