Unplanned
Last Updated: 09 Dec 2024 13:49 by Miroslav
Miroslav
Created on: 09 Dec 2024 13:49
Category: Editor
Type: Bug Report
2
Unable to see or reset font size and font name for selected text in multiple HTML elements

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:

  1. Select all the Editor content and apply a custom font size or font family.
  2. Select content, which has the same styles applied (for example, the 2nd and 3rd "foo" on line 1).
  3. Select content, which has different styles applies (for example, the 1st and 2nd "foo" on line 1).
  4. Select content in multiple paragraphs (for example, the last "foo" and the first "bar").

@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:

  • Reset (remove) the font styles separately for each HTML element.
  • Set another font style instead of resetting it.
0 comments