Articles in this section
Category / Section

How to Move Toolbar to Bottom in JavaScript Rich Text Editor?

2 mins read

To customize the JavaScript RichTextEditor by moving the toolbar to the bottom while using a limited set of tools, you can follow the steps outlined below. This involves adding a custom CSS class to the toolbar element and defining the necessary external CSS.

Step-by-Step Instructions

  1. Define Custom CSS: Create a CSS file or add the following styles to your existing stylesheet.

    .customToolbarWrap {
      position: absolute;
    }
    
    .customToolbar {
      top: 250px;
      border-top: inherit;
      border-bottom: inherit;
    }
    
  2. Initialize RichTextEditor: Use the following JavaScript code to initialize the RichTextEditor and apply the custom styles.

    let defaultRTE = new RichTextEditor({
      created: created,
    });
    defaultRTE.appendTo('#defaultRTE');
    
    function created() {
      defaultRTE.toolbarSettings.enable = true;
      defaultRTE.height = '250px';
      setTimeout(() => {
        document
          .getElementsByClassName('e-rte-toolbar')[0]
          .classList.add('customToolbar');
        document
          .getElementsByClassName('e-toolbar-wrapper')[0]
          .classList.add('customToolbarWrap');
      }, 0);
    }
    
  3. Adjust Toolbar Position: The above code will move the toolbar to the bottom of the RichTextEditor by applying the custom CSS classes after the editor is created.

Additional Notes

  • Ensure that the height of the RichTextEditor is set appropriately to accommodate the toolbar at the bottom.
  • You may need to adjust the top property in the .customTool class based on your layout requirements.

References

Conclusion
I hope you enjoyed learning on how to move toolbar to bottom in JavaScript Rich Text Editor.
You can refer to our JavaScript Rich Text Editor feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our JavaScript Rich Text Editor example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied