Skip to content

Commit 05c4dd1

Browse files
dimodidimodi
authored andcommitted
docs(Editor): Document built-in toolsets
1 parent 51b87a9 commit 05c4dd1

File tree

1 file changed

+48
-6
lines changed

1 file changed

+48
-6
lines changed

components/editor/toolbar.md

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,64 @@ To control the collection of buttons and commands available to the user, you pro
3333

3434
## Built-in Tool Lists
3535

36-
The Editor comes with two predefined sets of tools in the `EditorToolSets` static class:
36+
The Editor comes with [two predefined sets of tools](#predefined-toolset-configurations) in the `EditorToolSets` static class:
3737

38-
* `Default` - the default set of the most commonly used tools and commands.
39-
* `All` - All the available tools and commands the editor has.
38+
* `Default` includes the most commonly used tools and commands. If you do not apply any settings, the `Default` list of tools will be used.
39+
* `All` includes all the available tools and commands.
4040

41-
If you do not apply any settings, the `Default` list of tools will be used.
41+
The following example shows how to use the `All` toolset.
4242

43-
>caption Switch to the All tools built-in toolset
43+
>caption Use all built-in Editor tools
4444
4545
````CSHTML
4646
@using Telerik.Blazor.Components.Editor
4747
4848
<TelerikEditor Tools="@EditorToolSets.All">
4949
</TelerikEditor>
50+
51+
@code {
52+
private string EditorValue { get; set; } = string.Empty;
53+
}
5054
````
5155

56+
### Predefined Toolset Configurations
57+
58+
The following code snippets show the built-in toolset configurations in `EditorToolSets`. See the [Built-in Editor Tools]({%slug editor-built-in-tools%}) article for more information on each tool.
59+
60+
<div class="skip-repl"></div>
61+
62+
````cs
63+
public static List<IEditorTool> Default = new List<IEditorTool>()
64+
{
65+
new EditorButtonGroup(new Bold(), new Italic(), new Underline()),
66+
new Format(),
67+
new EditorButtonGroup(new AlignLeft(), new AlignCenter(), new AlignRight(), new AlignJustify()),
68+
new EditorButtonGroup(new UnorderedList(), new OrderedList(), new Indent(), new Outdent()),
69+
new EditorButtonGroup(new CreateLink(), new Unlink()),
70+
new InsertImage()
71+
};
72+
73+
public static List<IEditorTool> All = new List<IEditorTool>()
74+
{
75+
new EditorButtonGroup(new Undo(), new Redo()),
76+
new EditorButtonGroup(new Bold(), new Italic(), new Underline(), new Strikethrough()),
77+
new EditorButtonGroup(new SubScript(), new SuperScript()),
78+
new Format(),
79+
new FontFamily(),
80+
new FontSize(),
81+
new ForeColor(),
82+
new BackgroundColor(),
83+
new EditorButtonGroup(new AlignLeft(), new AlignCenter(), new AlignRight(), new AlignJustify()),
84+
new EditorButtonGroup(new UnorderedList(), new OrderedList(), new Indent(), new Outdent()),
85+
new EditorButtonGroup(new CreateLink(), new Unlink()),
86+
new InsertImage(),
87+
new InsertTable(),
88+
new EditorButtonGroup(new AddColumnBefore(), new AddColumnAfter(), new AddRowBefore(), new AddRowAfter()),
89+
new EditorButtonGroup(new DeleteColumn(), new DeleteRow(), new DeleteTable()),
90+
new EditorButtonGroup(new MergeCells(), new SplitCell()),
91+
new ViewHtml()
92+
};
93+
````
5294

5395
## Choose Toolbar Items
5496

@@ -249,4 +291,4 @@ When adding a built-in tool to the collection, you can set various parameters to
249291

250292
## See Also
251293

252-
* [Editor Overview]({%slug editor-overview%})
294+
* [Editor Overview]({%slug editor-overview%})

0 commit comments

Comments
 (0)