使用RadEditor -Telerik。
当Toolbarmode设置为Default时,工具不会显示在chrome浏览器中,而IE浏览器和firefox中的工作正常。
我不知道为什么会出现这个问题。
这是我的代码
Private Function GetNewEditorControl(ByVal sField As String, ByVal iWidth As Integer, _
ByVal iHeight As Integer, ByVal bUnique As Boolean, ByVal iColFldWidth As Integer, _
ByVal iColSpan As Integer) As Telerik.Web.UI.RadEditor
Dim sProc As String = System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name & "::" & System.Reflection.MethodInfo.GetCurrentMethod().Name
Dim iUltimateWidth As Integer
Select Case iWidth
Case 0
iUltimateWidth = iColFldWidth
If iColSpan > 1 Then iUltimateWidth = iUltimateWidth + ((iColSpan - 1) * 4)
Case Else
iUltimateWidth = iWidth
End Select
Dim oEditor As New Telerik.Web.UI.RadEditor()
oEditor.ID = sField
If bUnique = False Then oEditor.ID = sField & "[" & GetNextSeqNo.ToString & "]"
oEditor.Height = iHeight * 20
oEditor.Width = System.Web.UI.WebControls.Unit.Pixel(iUltimateWidth)
SetEditorProperties(oEditor)
Return oEditor
End Function
'V_T:2/23/2015 MMR Change
Private Sub SetEditorProperties(ByVal oEditor As Telerik.Web.UI.RadEditor)
oEditor.ToolbarMode = EditorToolbarMode.Default
oEditor.EditModes = EditModes.Design
oEditor.NewLineMode = EditorNewLineModes.Br
Dim uploadImages As String() = New String() {"~/Temp/MMRImages"}
oEditor.ImageManager.ViewPaths = uploadImages
oEditor.ImageManager.UploadPaths = uploadImages
oEditor.ImageManager.MaxUploadFileSize = 2000000
oEditor.ImageManager.AllowMultipleSelection = False
oEditor.ImageManager.EnableAsyncUpload = True
oEditor.ImageManager.EnableImageEditor = False
oEditor.EnsureToolsFileLoaded()
'to remove the Image context menu in the editor content area
Dim imgTag As Telerik.Web.UI.EditorContextMenu = oEditor.ContextMenus.FindByTagName("IMG")
imgTag.Enabled = False
请帮助我解决这个问题。