⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defaultvb.aspx.vb

📁 Telerik是很大的第三方软件制造商
💻 VB
字号:

Imports System
Imports Telerik.WebControls.RadEditorUtils


Namespace Telerik.EditorExamplesVBNET.Editor.Examples.ServersideAPI
   
   '/ <summary>
   '/ Summary description for DefaultCS.
   '/ </summary>
   Public Class DefaultVB
      Inherits Telerik.QuickStart.XhtmlPage
      Protected editor1 As Telerik.WebControls.RadEditor
      
      
      Private Sub Page_Load(sender As Object, e As System.EventArgs) Handles MyBase.Load
         If Not Page.IsPostBack Then
            
            ' Add additional colors
            editor1.Colors.Add("yellow")
            editor1.Colors.Add("pink")
            editor1.Colors.Add("aqua")
            
            ' Add additional css classes
            editor1.CssClasses.Add("Links class ", "a.link")
            editor1.CssClasses.Add("Images class ", ".img")
            
            ' Add additional language 
            editor1.Languages.Add("fr-FR", "French")
            editor1.Languages.Add("en-US", "English")
            
            Dim radEditorStatistics As New [Module]("RadEditorStatistics")
            radEditorStatistics.DockingZoneId = "Bottom"
            
            Dim radEditorNodeInspector As New [Module]("RadEditorNodeInspector")
            radEditorNodeInspector.DockingZoneId = "Module"
            
            ' Add additional modules
            editor1.Modules.Clear()
            editor1.Modules.Add(radEditorStatistics)
            editor1.Modules.Add(radEditorNodeInspector)
            
            ' Add additional context menus
            Dim ImgContextMenu As New ContextMenu("LI")
            
            ImgContextMenu.Tools.Add(New ToolbarButton("Cut"))
            ImgContextMenu.Tools.Add(New ToolbarButton("Copy"))
            ImgContextMenu.Tools.Add(New ToolbarButton("Paste"))
            
            editor1.ContextMenus.Add(ImgContextMenu)
            
            ' Add additional fonts
            editor1.FontNames.Add("Arial")
            editor1.FontNames.Add("Arial Narrow")
            editor1.FontNames.Add("Arial Black")
            
            ' Add additional font sizes
            editor1.FontSizes.Clear()
            editor1.FontSizes.Add(2)
            editor1.FontSizes.Add(3)
            
            
            ' Add additional paragraph styles
            editor1.Paragraphs.Add("Clear Formatting", "body")
            
            editor1.Paragraphs.Add("Heading 1", "h1")
            editor1.Paragraphs.Add("Heading 2", "h2")
            editor1.Paragraphs.Add("Heading 3", "h3")
            
            ' Clear old symbols and add new symbols:
            editor1.Symbols.Clear()
            
            ' The powerful SymbolsCollection allows you easy to add
            ' more than one symbol from a string or char array
            editor1.Symbols.Add("€£¥©®™±≠≤≥÷×∞αβγδεζηθικλμνξοπρςστυφχψω")
            
            ' Links are now organized in a tree structure:
            editor1.Links.ChildLinks.Clear()
            Dim myLinks As Link = editor1.Links.Add("My Links", "")
            myLinks.Add("Link 1", "http://google.com")
            myLinks.Add("Link 2", "http://yahoo.com")
            myLinks.Add("Link 3", "http://telerik.com")
            
            editor1.Links("My Links")("Link 3").Add("r.a.d.editor", "http://www.telerik.com/r.a.d.editor/")
            
            
            ' Add Snippets				
            editor1.Snippets.Clear()
            editor1.Snippets.Add("r.a.d.editor", "<table> <tr> <td> r.a.d.<b>editor</b> is the best editor out there.</td> </tr> </table>")
            
            ' Add new toolbar (dockable is enabled by default)
            Dim toolbar = New Toolbar("My Toolbar")
            editor1.Toolbars.Add(toolbar)
            
            ' Add custom drop down to the new toolbar with 10 items
            Dim dropDown = New ToolbarDropDown("MyDropDown1")
            Dim i As Integer
            For i = 0 To 9
               dropDown.Items.Add(New Telerik.WebControls.RadEditorUtils.ListItem((i + 1).ToString("Item #"),(i + 1).ToString()))
            Next i
            toolbar.Tools.Add(dropDown)
            
            ' Add one button with the standard "Bold" command
            toolbar.Tools.Add(New ToolbarButton("Bold"))
         End If
      End Sub 'Page_Load
      Protected Overrides Sub OnInit(e As EventArgs)
         '
         ' CODEGEN: This call is required by the ASP.NET Web Form Designer.
         '
         InitializeComponent()
         MyBase.OnInit(e)
      End Sub 'OnInit
      
      
      '/ <summary>
      '/ Required method for Designer support - do not modify
      '/ the contents of this method with the code editor.
      '/ </summary>
      Private Sub InitializeComponent()
      End Sub 'InitializeComponent
   End Class 'DefaultVB 
End Namespace 'Telerik.EditorExamplesVBNET.Editor.Examples.ServersideAPI

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -