Hi I am trying to custom configure the CKEditor toolbar in my VS2010 VB.NET ASP application.
However, it is not clear where I can configure it "In Code". So I took the following to
mean I could put in it my "code behind page, e.g. Default.aspx.vb.
So I tried putting the following code in the Page_Load() function, but it complains
Dim CKEditor1 As New CKEditor.NET.CKEditorConfig
CKEditor1.toolbar = "Basic"
Language from Manual:
CKEditor toolbar can be defined in a similar way as in JavaScript, using an array of objects representing toolbar elements
(buttons, drop-down menus).
The toolbar can be defined inside the source code file.
CKEditor1.config.toolbar = new object[]
{
new object[] { "Source" },
new object[] { "Bold", "Italic", "Underline", "Strike", "-", "Subscript", "Supersc
new object[] { "NumberedList", "BulletedList", "-", "Outdent", "Indent" },
"/",
new object[] { "Styles", "Format", "Font", "FontSize", "TextColor", "BGColor", "-"
};
However, it is not clear where I can configure it "In Code". So I took the following to
mean I could put in it my "code behind page, e.g. Default.aspx.vb.
So I tried putting the following code in the Page_Load() function, but it complains
Dim CKEditor1 As New CKEditor.NET.CKEditorConfig
CKEditor1.toolbar = "Basic"
Language from Manual:
CKEditor toolbar can be defined in a similar way as in JavaScript, using an array of objects representing toolbar elements
(buttons, drop-down menus).
The toolbar can be defined inside the source code file.
CKEditor1.config.toolbar = new object[]
{
new object[] { "Source" },
new object[] { "Bold", "Italic", "Underline", "Strike", "-", "Subscript", "Supersc
new object[] { "NumberedList", "BulletedList", "-", "Outdent", "Indent" },
"/",
new object[] { "Styles", "Format", "Font", "FontSize", "TextColor", "BGColor", "-"
};
Re: custom configure the CKEditor toolbar in VS2010 VB.NET A
...and...
...then your Page_Load can look like this (not the full toolbar, just a sample):
MrG
Re: custom configure the CKEditor toolbar in VS2010 VB.NET A
This is an example showing the config of a basic toolbar in config.js:
You should them be able to use .NET to reference the toolbar:
or as part of a javascript replace method (this example is also wrapped with jQuery's doc.ready function)
Re: custom configure the CKEditor toolbar in VS2010 VB.NET A
Thanks MrG, this worked perfect.
