必須有一種簡單的方法來設置字體名稱下拉列表的默認選定字體。 我一直在環視Telerik網站和論壇,但我找不到一個簡單的方法。也許沒有簡單的方法,但也許我找不到它。如何在Telerik的RadEditor上設置默認字體?
這裏是我的RadEditor:
<telerik:RadEditor ID="RadEditor1" runat="server" ContentFilters="MakeUrlsAbsolute,ConvertToXhtml,RemoveScripts"
EditModes="All" EnableResize="false" Font-Bold="false" Font-Names="Arial" Font-Size="8pt"
Height="230px" MaxHtmlLength="3000" MaxTextLength="3000" NewLineMode="Br" Skin="Web20">
<Tools>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="ImageManager" />
<telerik:EditorSeparator />
<telerik:EditorTool Enabled="true" Name="FontName" />
<telerik:EditorTool Enabled="true" Name="FontSize" />
<telerik:EditorSeparator />
<telerik:EditorTool Enabled="true" Name="BackColor" />
<telerik:EditorTool Enabled="true" Name="ForeColor" />
<telerik:EditorTool Enabled="true" Name="Bold" />
<telerik:EditorTool Enabled="true" Name="Italic" />
<telerik:EditorTool Enabled="true" Name="Underline" />
<telerik:EditorSeparator />
<telerik:EditorTool Enabled="true" Name="Copy" />
<telerik:EditorTool Enabled="true" Name="Cut" />
<telerik:EditorTool Enabled="true" Name="Paste" />
<telerik:EditorTool Enabled="true" Name="AjaxSpellCheck" Text="Spell Check" />
</telerik:EditorToolGroup>
</Tools>
<ImageManager MaxUploadFileSize="1048576" SearchPatterns="*.jpg,*.jpeg,*.png,*.gif,*.bmp, *.ico"
UploadPaths="~/images/" ViewPaths="~/images/" />
</telerik:RadEditor>
我希望你們中的一個在那裏能告訴我!謝謝!
OnClientLoad的方式工作!謝謝!!! 我用這個爲OnLoad: 函數RadEditorLoad(sender,eventArgs){ var tool = sender.getToolByName(「FontName」); tool.set_value(「Arial」); } – unnknown
好吧它確實將選擇更改爲Arial,但是當我在文本區域內單擊時,它會將其更改爲「Times New Roman」,也許存在一個Js事件,當我在該區域中單擊時,我需要處理 – unnknown