change the item label

Hi
  Is it possible to change the item label?
  Please see the attached image

Attachment: Untitled_3b7c1ec0.zip

1 Reply 1 reply marked as answer

RK Revanth Krishnan Syncfusion Team December 28, 2020 09:19 AM UTC

Hi Yeadam, 
 
 
Greetings from Syncfusion support. 
 
 
We have validated your query “To change the label of the alignment and the format items in the toolbar” 
 
This can be achieve using the localization and the format property in the Rich Text Editor, the alignment item’s label can be changed using the localization with `locale` property and the Format item’s label can be changed using the `e-richtexteditor-format`  `types` property. We have prepared a sample for your reference, 
 
Code Snippet: 
Index.cshtml 
<ejs-richtexteditor id="locale" locale="de-DE"> 
    <e-richtexteditor-format types="@ViewBag.fontFamilyItems"> 
    </e-richtexteditor-format> 
    <e-content-template> 
        <p> 
            The Rich Text Editor control is WYSIWYG ('what you see is what you get') editor that provides the best user experience to create and update the content. 
            Users can format their content using standard toolbar commands. 
        </p> 
    </e-content-template> 
</ejs-richtexteditor> 
<script> 
    ej.base.L10n.load({ 
        "de-DE": { 
            "richtexteditor": { 
                "alignments": "Custom alignment Tooltip", 
                "justifyLeft": "Custom Left Tooltip", 
                "justifyCenter": "Custom Center Tooltip", 
                "justifyRight": "Custom Right Tooltip", 
                "justifyFull": "Custom Justify Tooltip", 
                "formats": "Custom Formats Tooltip", 
                "alignmentsDropDownLeft": "Custom Aligment Left", 
                "alignmentsDropDownCenter": "Custom Aligment Center", 
                "alignmentsDropDownRight": "Custom Aligment Right", 
                "alignmentsDropDownJustify": "Custom Aligment Justify" 
            } 
        } 
    }) 
</script> 
 
Controller.cs 
        public IActionResult Index() 
        { 
            object item1 = new 
            { 
                text = "Paragraph Custom Label", 
                value = "p", 
                cssClass = "e-paragraph" 
            }; 
            object item2 = new 
            { 
                text = "Heading 1", value = "h1", cssClass = "e-h1" 
            }; 
            object item3 = new 
            { 
                text = "Heading 2", value = "h2", cssClass = "e-h2" 
            }; 
            ViewBag.fontFamilyItems = new[] { item1, item2, item3 }; 
            return View(); 
        } 
 
 
Please check the above code snippet and the sample and let us know if it satisfies your requirement. 
 
Regards, 
Revanth 


Marked as answer
Loader.
Up arrow icon