[RTE] Custom Format Option in the toolbar

Hi Syncfusion Team

I would like to have a custom option in the format dropdown that does not append any tags in the RichTextEditor, I managed to create an entry as shown below but it seems that it will contains <p> tag as default.

Screenshot from 2021-09-28 00-22-58.png

This is my sample code:

const format = {
default: 'Normal Text',
width: '65px',
types: [
{ text: 'Normal Text', command: 'formatBlock', subCommand: ''},
{ text: 'Paragraph' },
{ text: 'Code' },
{ text: 'Quotation' },
{ text: 'Heading 1' },
{ text: 'Heading 2' },
{ text: 'Heading 3' },
{ text: 'Heading 4' },
{ text: 'Heading 5' },
{ text: 'Heading 6' },
],
};

Please assist me with the custom option that does not have any tags append

Thanks


1 Reply

IS Indrajith Srinivasan Syncfusion Team September 28, 2021 11:18 AM UTC

Hi Amanda, 
 
Greetings from Syncfusion support, 
 
We have validated your reported query, “custom option that does not have any tags append”. This case is not valid with the editor, since it is an html editor the browser behavior of enclosing <p> tags will be added by default. 
 
Regards, 
Indrajith 


Loader.
Up arrow icon