Child pages
  • Guide to HTML Editor Integration
Skip to end of metadata
Go to start of metadata

Warning:

This document includes information for a version of cPanel & WHM that has reached End of Life. For more information, read our cPanel & WHM Long-Term Support documentation.

 

Overview

This document describes how to integrate the HTML Editor within cPanel's File Manager interface (Home >> Files >> File Manager). You must perform these steps to use the HTML Editor with cPanel & WHM version 11.38 and earlier cloned x3 themes.

Notes:

  • System administrators and root-enabled resellers must integrate the current HTML editor with x3 themes that they cloned prior to cPanel & WHM version 11.40.
  • To integrate the HTML editor with your current x3 theme, you must log in as the root user.
  • Throughout this document, the example variable your_theme represents the name of your theme.

Before you begin

Important:

Before you begin the integration process, we recommend that you create a backup of your theme. This ensures that you do not lose your theme duiring the integration process.

Run the following command to create a backup of your theme:

cp -afv /usr/local/cpanel/base/frontend/your_theme /usr/local/cpanel/base/frontend/your_theme_backup

Integrate your files

Perform the following steps to synchronize the editor-related files for cPanel and your closed theme, and then compress the files:

  1. Run the following commands to synchronize the new HTML editor directories with your theme's directories:

    rsync -av /usr/local/cpanel/base/frontend/x3/filemanager/editors /usr/local/cpanel/base/frontend/your_theme/filemanager/editors 
    rsync -av /usr/local/cpanel/base/frontend/x3/js/filemanager.js /usr/local/cpanel/base/frontend/your_theme/js/filemanager.js 
    rsync -av /usr/local/cpanel/base/frontend/x3/js/filemanager_optimized.js /usr/local/cpanel/base/frontend/your_theme/js/filemanager_optimized.js 
    rsync -av /usr/local/cpanel/base/frontend/x3/filemanager/popups/htmledit.html /usr/local/cpanel/base/frontend/your_theme/filemanager/popups/htmledit.html 
    rsync -av /usr/local/cpanel/base/frontend/x3/3rdparty /usr/local/cpanel/base/frontend/your_theme/3rdparty
  2. Run the following command to navigate to your updated theme’s directory:

    cd /usr/local/cpanel/base/frontend/your_theme
  3. Run the following commands to create the symlinks to your theme's directory:

    Note:

    To use the HTML Editor and File Browser features, you must create a symlink from your theme’s directory to each folder.

    ln -s /usr/local/cpanel/share/elfinder_dependencies 
    ln -s /usr/local/cpanel/share/ckeditor_plugins
  4. Run the following commands to compress the newly-integrated theme directories and save disk space:

    gzip -9 -n -c '/usr/local/cpanel/base/frontend/your_theme/js/filemanager_optimized.js' > /usr/local/cpanel/base/frontend/your_theme/js/filemanager_optimized.js.gz 
    gzip -9 -n -c '/usr/local/cpanel/base/frontend/your_theme/js/filemanager.js' > /usr/local/cpanel/base/frontend/your_theme/js/filemanager.js.gz

Additional documentation