2

[フォント名]ドロップダウンリストでデフォルトで選択されているフォントを設定する簡単な方法が必要です。Telerikのサイトやフォーラムを見回してきましたが、簡単な方法が見つかりません。簡単な方法はないかもしれませんが、私はそれを見つけることができないかもしれません。

これが私の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>

そこにいるあなたの一人が私に教えてくれることを願っています!ありがとう!

4

3 に答える 3

5

この記事が役立つかもしれませんhttp://www.telerik.com/help/aspnet-ajax/editor-default-font-for-editable-content.html

次のコードを使用して、OnClientLoad イベントでデフォルトの FontName ヘッダー ドロップダウン値を設定することもできます。

var tool = editor.getToolByName("FontName");
tool.set_value("Tahoma");
于 2012-09-14T13:43:29.857 に答える
5

これはうまくいきました:

編集者:

 <telerik:RadEditor ID="myEditor" OnClientLoad="RadEditorLoad" runat="server" ... >

ハンドラ:

        function RadEditorLoad(editor, eventArgs) {

            // Set the Editor Default Font to Arial

             editor.get_contentArea().style.fontFamily = 'Arial'
        }

これを見つけた: http://www.telerik.com/community/forums/aspnet-ajax/editor/radeditor-setting-font.aspx

于 2012-09-18T21:25:04.557 に答える