Description

This function opens a file in the HTML editor.


Examples




$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.



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 Module="Fileman::htmleditor ( $FORM('dir','file','baseurl','basedir','charset','write_stdin'))">




cpapi1 --user=username Fileman htmleditor public_html myfile.html http://www.example.com/home/user /home/user/public.html UTF-8 1


This function opens the HTML editor.



Parameters

ParameterTypeDescriptionPossible valuesExample
dirstring

Required

The file's directory.

Any valid directory name.public_html
filestring

Required

The file to open.

Any valid filename.myfile.tar
baseurlstring

Required

The base URL for automated functions.

Any valid base URL.
http://www.example.com/home/user/
basedirstring

The HTML file's base directory.

This value defaults to the home/user/public_html directory.

Any valid base directory.home/user/public_html
charsetstring

Required

The character set in which to encode the HTML.

Any valid character set.UTF-8
write_stdinBoolean

Required

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

  • 0 — Do not replace.
  • 1 — Replace.
1

Returns

This function opens the HTML editor in a web browser.