When copying from the Editor and pasting in Word (keep source formatting), basic stuff like font and font size are not kept.
The text will always become Times New Roman, and the font sizes are not the same, for example 14pt becomes 13.5pt...
Using IFrame-mode and injecting css to set default fonts since that is not supported in a proper way...
From what I can see you need to intercept the copy-event and fix the html like your competitors do (for example syncfusion)...
I'm using the Editor in a form along with several other inputs (e.g. TextBox, NumericTextBox).
If the user enters an invalid value for the other inputs, they get a red border. The Editor, however, does not have such a border when its value is invalid and thus the form elements are not consistent. Please add a red border for the invalid state of the Editor, too.
===
ADMIN EDIT
===
At this stage, the Editor is not treated as a standard input and it does not support all of the input's capabilities - such as invalid state, disabled state, sizing, fill and more.
The current request may potentially be part of a bigger design story that strives to align the Editor's functionalities with the rest of the inputs ( TextBox, NumericTextBox and more).
The content area of the Editor currently has a "k-invalid" class when the value is not valid. As a workaround for the time being, you may add a red border with CSS: https://blazorrepl.telerik.com/mSvmFglg25NXJw7K05.The Font Size and Font Family tools display the currently applied style value in the user selection only if the selection is inside one HTML element. This prevents the user from resetting (removing) the current font style.
Test scenario:
@using Telerik.Blazor.Components.Editor
<TelerikEditor @bind-Value="@EditorValue"
Tools="@EditorToolSets.All" />
<h2>Raw Editor Value</h2>
<TelerikTextArea @bind-Value="@EditorValue"
Rows="5" />
@code {
private string EditorValue { get; set; } = @"<p><strong>Foo</strong> foo foo.</p><p>Bar <strong>bar</strong> bar.</p><p>Baz baz <strong>baz</strong>.</p>";
}
The possible workarounds are:
Hello,
the Color Tool Customization in the Telerik Editor is not working correctly. Colors are only generate HTML in Rgb.
The documentation says: "ValueFormat": The format, which the Color tool will set in the generated HTML markup. Use Rgb
or Hex
.
Thanks in advance.
For example: https://docs.telerik.com/blazor-ui/components/editor/built-in-tools#color-tool-customization
@using Telerik.Blazor.Components.Editor
<TelerikEditor Tools="@EditorTools"
@bind-Value="@EditorValue">
</TelerikEditor>
@code {
private string EditorValue { get; set; }
private List<IEditorTool> EditorTools { get; set; } = new List<IEditorTool>()
{
new ForeColor()
{
Title = "Text Color",
Colors = new List<string> { "#f00", "#ff9900", "rgb(0, 128, 0)", "rgba(0, 0, 255, .8)" },
ValueFormat = ColorFormat.Hex
},
new ViewHtml()
};
}
If the editor's HTML markup contains inline CSS styles, and a CSS attribute value includes a semicolon (;), it breaks the applied styles and throws an exception.
For example:
<p style= "" ....background-image: url('data:image/png;base64...;""</p>
The exception is:
Uncaught TypeError: Cannot read properties of undefined (reading 'trim')
=== ADMIN EDIT ===
The issue can also occur when there is an invalid inline style with two semicolons without a complete style-value pair in-between.
For example:
<p style=""color:red; b ;"">sdf</p>
Please allow the user to copy an image from the file system (for example, Windows Explorer) and paste it in the Editor without opening the image first.
Currently this works in the Kendo UI jQuery Editor.
The Telerik Blazor Telerik Editor Insert Hyperlink functionality is not consistent with other Telerik Editor components and non Telerik Editors. Usually when dealing with Editors and the Insert Hyperlink feature, you can insert a hyperlink without need to select and convert existing text. You can also usually use the ctrl+k keyboard shortcut instead of clicking on the button. This does not work in the Telerik Blazor Editor.
The differences and lack of functionality has been raised as an issue by end users.
Expected Behaviour
This can be reproduced on any of the Kendo UI for jQuery demo pages. It can also be reproduced within the editor on this very form.
Actual Behaviour
This can be reproduced on any of the demo pages that has the hyperlink button.
I am using the LinkCommandArgs to programmatically create a link. I am adding all the required parameters (string href, string text, string target, string title) but no link is added to the Editor content.
Reproduction: https://blazorrepl.telerik.com/QyOTwCuU48HSG5xp41.
===
ADMIN EDIT
===
For the time being, you may add a link using the HtmlCommandArgs tool and the "insertHtml" command like so: https://blazorrepl.telerik.com/GyuTmMkt56f3YiM754.
When adding an icon such as <i class="fa-light fa-envelope"></i> (the format which FontAwesome recommends), the icon's HTML disappears upon saving. We figured this was maybe due to the type of tag used (the i tag), so we tried using a div instead (<div class="fa-light fa-envelope"></div>). This div is not stripped from the HTML but the icon is not rendered.
Please allow inserting icons in the Editor content.
It would be nice to have an ability to group CustomTool / icons much like we can do EditorButtonGroup(s) - e.g.
new CustomToolGroup (new CustomTool("Save"), new CustomTool("Import"), new CustomTool("Export"))
The Editor currently supports only numeric ordered list. I'm looking for an option to add different types of ordered lists - roman and alphabetical.
Please add support for these types of ordered lists similiar to the KendoReact Editor.
The Editor is not showing its Value in the following scenario:
Possible workarounds are:
When I paste a table from Word or Excel in the Editor, some of the formatting is lost. The Kendo React Editor supports most of the formatting and I would like to see the same behavior for Blazor.
I know the indent option is available.
But it would be great if it would be possible to allow tab presses in the editor control.
Maybe the option to use @onkeydown or a parameter of AllowTabs.
The TelerikEditor demos all show bind-Value being used to marshal HTML in and out of the editor:
<TelerikEditor @bind-Value="@TheEditorValue" Width="650px" Height="400px"></TelerikEditor>
However, this causes problems - the underlying ProseMirror component emits it's own HTML (e.g. for image drag handles), which is visible in the bound Value property.
We need to be able to export "clean" HTML from the viewer, otherwise we end up saving this superflous HTML as part of our document.
This REPL shows the issue:
https://blazorrepl.telerik.com/mHODmObJ36vZ7ivR09
@page "/editor/tools"
@using Telerik.Blazor.Components.Editor
<TelerikEditor Tools="@EditorToolSets.All"
Height="300px"
@bind-Value="@Value"
EditMode="EditorEditMode.Div"
></TelerikEditor>
<pre style="white-space: pre-wrap;">@Value</pre>
@code {
public string Value { get; set; } =
"<img src=\"img/toolbar-assets/repl-logo.svg\" />";
}
1. Open the REPL and click "Run" - observe that the bound HTML is simply
<img src="img/toolbar-assets/repl-logo.svg" />
2. Click on the Telerik logo image inside the editor - observe that the bound HTML is now
<p><img src="img/toolbar-assets/repl-logo.svg" contenteditable="false" draggable="true" class="ProseMirror-selectednode"><div class="k-editor-resize-handles-wrapper ProseMirror-widget" style="width: 857px; height: 78px; top: 8px; left: 8px;" contenteditable="false"><div class="k-editor-resize-handle southeast" data-dir-image-resize="southeast"></div><div class="k-editor-resize-handle east" data-dir-image-resize="east"></div><div class="k-editor-resize-handle south" data-dir-image-resize="south"></div><div class="k-editor-resize-handle north" data-dir-image-resize="north"></div><div class="k-editor-resize-handle west" data-dir-image-resize="west"></div><div class="k-editor-resize-handle southwest" data-dir-image-resize="southwest"></div><div class="k-editor-resize-handle northwest" data-dir-image-resize="northwest"></div><div class="k-editor-resize-handle northeast" data-dir-image-resize="northeast"></div></div><br class="ProseMirror-trailingBreak"></p>
3. Deselect the image - observe that the bound HTML no longer contains the image handles etc, but is still more verbose than when we started
<p><img src="img/toolbar-assets/repl-logo.svg" contenteditable="false" draggable="true" class=""><br class="ProseMirror-trailingBreak"></p>
4. At any point during the above steps, click the "View HTML" button in the Editor toolbar - observe that it is able to present a "clean" structure which contains no ProseMirror markup etc.
How do we access this HTML via the TelerikEditor Blazor APIs?