cPanel API 1 Functions - Fileman::htmleditor

Description

This function opens a file in the HTML editor.

Warning:

cPanel API 1 is deprecated. We strongly recommend that you do not use cPanel API 1. However, no equivalent function exists in our newer APIs.

 

Examples


 LiveAPI PHP Class

$cpanel new CPANEL(); // Connect to cPanel - only do this once.
$open_html_editor $cpanel->api1('Fileman''htmleditor'array('public_html''myfile.html''http://www.example.com/home/user/''/home/user/public.html''UTF-8''1')); // Call the function.

 LiveAPI Perl Module

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $open_html_editor $cpliveapi->api1('Fileman''htmleditor' ['public_html''myfile.html''http://www.example.com/home/user/''/home/user/public.html''UTF-8''1']); # Call the function.

 cPanel Tag System (deprecated)

<cpanel Module="Fileman::htmleditor ( $FORM('dir','file','baseurl','basedir','charset','write_stdin'))">

 Command Line
cpapi1 --user=username Fileman htmleditor dir=public_html file=myfile.html baseurl=http://www.example.com\/home\/user basedir=\/home\/user\/public.html charset=UTF-8 write_stdin=1

 

Notes:

  • You must URI-encode these values.
  • username represents your account-level username.
 
Output (web browser)

This function opens the HTML editor.

Parameters

 Parameter 

Type

Description

Possible values

Example

 dir

 string

 Required

 The file's directory.

 Any valid directory name. 

 public_html

 file

 string

 Required

 The file to open.

 Any valid filename.

 myfile.tar

 baseurl

 string

 Required

 The base URL for automated functions.

 Any valid base URL.

 http://www.example.com/home/user/ 

 basedir

 string

 The HTML file's base directory.

 This value defaults to thehome/user/public_html directory.

 Any valid base directory.

 home/user/public_html

 charset

 string

 Required

 The character set in which to encode the HTML.

 Any valid character set.

 UTF-8

 write_stdin

 Boolean 

 Required

 Whether to replace the default HTML editor template strings with the values represented in the HTML editor's configuration hash. 

  • 0 — Donotreplace.
  • 1 — Replace.

 1

 

Returns

This function opens the HTML editor in a web browser.

  • 10 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....