Feature Request: possibility to set the element for 'Normal' format block in HtmlEditor #344

Closed
opened 2026-01-29 17:35:47 +00:00 by claunia · 3 comments
Owner

Originally created by @OndrejUzovic on GitHub (Mar 15, 2022).

Currently when a user selects 'Normal' format block in the HtmlEditor the block <p></p> is inserted into the text area.
However the <p></p> is not always optimal and instead of that e.g. <div></div> may be needed.
Therefore, it would be nice if the component RadzenHtmlEditorFormatBlock would have a parameter allowing to set a custom element for 'Normal' formatting.

Originally created by @OndrejUzovic on GitHub (Mar 15, 2022). Currently when a user selects 'Normal' format block in the HtmlEditor the block `<p></p>` is inserted into the text area. However the `<p></p>` is not always optimal and instead of that e.g. `<div></div>` may be needed. Therefore, it would be nice if the component `RadzenHtmlEditorFormatBlock` would have a parameter allowing to set a custom element for 'Normal' formatting.
Author
Owner

@akorchev commented on GitHub (Mar 16, 2022):

Radzen uses the built-in HTML editing which as far as I know does not allow such customization for the formatBlock command.

@akorchev commented on GitHub (Mar 16, 2022): Radzen uses the [built-in HTML editing](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) which as far as I know does not allow such customization for the formatBlock command.
Author
Owner

@OndrejUzovic commented on GitHub (Mar 16, 2022):

Radzen uses the built-in HTML editing which as far as I know does not allow such customization for the formatBlock command.

I am not sure if you are right that such customization is not allowed for the formatBlock command. Also the link you provided: built-in HTML editing says: Virtually all block-level elements can be used.

Also when I try it manually the <div></div> block works fine.

So please could you reconsider this feature?

@OndrejUzovic commented on GitHub (Mar 16, 2022): > Radzen uses the [built-in HTML editing](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) which as far as I know does not allow such customization for the formatBlock command. I am not sure if you are right that such customization is not allowed for the formatBlock command. Also the link you provided: [built-in HTML editing](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) says: `Virtually all block-level elements can be used.` Also when I try it manually the `<div></div>` block works fine. So please could you reconsider this feature?
Author
Owner

@akorchev commented on GitHub (Mar 16, 2022):

We won't be considering it but would check a pull request.

@akorchev commented on GitHub (Mar 16, 2022): We won't be considering it but would check a pull request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#344