Hi,
We have dropdowns in WebHtmlEditor control to select Font, Font Size, Formatting, Style and Insert. after selecting the value in dropdowns, they still shows the text instead of selected value.
example: if i select font size as 7, the dropdown doesn't show 7 as selected value it shows "Size" as the text, how can i show the selected value instead of the text.
any help is greatly appreciated.
Thanks.
example: if i select font name as Arial, the dropdown doesn't show Arial as selected value it shows "Font" as the text, how can i show the selected value instead of the text.
The WebHtmlEditor does not support detection of styles and attributes of text at the location of caret/selection. Therefore it is not able to keep selected states/values in toolbar buttons (font-size, color, etc.).
Abishek,Liya:
I have the same issue...finally i got the solution.
The following Javascript code work fine for me...
function msgEditor_BeforeAction(oEditor, actID, oEvent, p4, p5, p6, p7, p8) { try { if (p6 == 'select') { if (actID == 'FontName') { var _font = document.getElementById('Fontstyle'); _font.innerText = p5; } else if (actID == 'FontSize') { var _fontsize = document.getElementById('Size'); _fontsize.innerText = p5; } } } catch (ex) { } }
Hi Liya,
I wanted to know if you were able to solve your issue based on Sample. or you still need help. Please let me know.
Did u follow the JavaScript code,When I used the mentioned javascript code ,I get the following outputs ..
Select font in Font style Combo,
After selecting any one of the value in Combo,I got like this,
If you still confusing,view the following website,
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2012.1/CLR4.0/html/WebHtmlEditor_Client_Side_Events_CSOM.html
OR
Download the sample Code ,it will help u..Thanks ..
We have select the text in editor it does not shows the selected font name in dropdown. they still shows the "font" in dropdown.
example: if i the change the font for selected text then font name is shown on dropdown, after loading the page, dropdown they still shows the "font".