We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Add fontName, fontSize, fontColor, backgroundColor in toolbar - Angular Way

Hello,

How can I add fontName, fontSize, fontColor, backgroundColor in toolbar the Angular Way?

I tried: e-tools-font-fontName="true" and different other combinations, but could not find the good one.

Thank you,

Yann


2 Replies

KS Kalai Selvi Rajendran Syncfusion Team January 29, 2016 05:54 AM UTC

Hi Yann,
Thanks for contacting Syncfusion support.
For adding fontName, fontSize, fontColor and backgroundColor to the toolbar in RTE control by Angular way, first define the toolsList and tools as array and assign it to the scope variable and then the scope will utilize it in corresponding attributes. Please refer to the below code example.

<code>



            <textarea id="rteSample" ej-rte e-width="100%" e-toolsList="toolslist" e-tools="tools"  e-height="266" e-value="rteValue"></textarea>

    <script type="text/javascript" class="jsScript">
   
      var toolsList= ["font"];
      var tool = { font: ["fontName""fontSize""fontColor""backgroundColor"],}
        angular.module('syncApp', ['ejangular'])
            .controller('RTECtrl'function ($scope)
            {
                $scope.rteValue = "Description: The Rich Text Editor (RTE) control is an easy to render in client side. Customer easy to edit the contents and get the HTML content for";
                $scope.tools = tool;
                $scope.toolslist = toolsList;
                $scope.style="color:#5C5C5C";
            });       
    
</script>
</code>


Please refer to the below link for online demo:

http://jsplayground.syncfusion.com/unailg0g


Regards

Kalai Selvi



YB Yann Bruneau February 1, 2016 08:05 AM UTC

Thank you!

Loader.
Up arrow icon