Child pages
  • cPanel API 1 Functions - Fileman::htmleditor

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt

This function opens a file in the HTML editor.

Include Page
LIB:_cPanelAPI1NoEquivalent
LIB:_cPanelAPI1NoEquivalent


Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleLiveAPI PHP Class


Code Block
languagephp
linenumberstrue
$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.

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink


Expand
titleLiveAPI Perl Module


Code Block
languageperl
linenumberstrue
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.

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink


Expand
titlecPanel Tag System (deprecated)

Include Page
LIB:_cPanelTagsWarning
LIB:_cPanelTagsWarning

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



Expand
titleCommand Line


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

Include Page
LIB:_cPanelAPI1CLINote
LIB:_cPanelAPI1CLINote


Expand
titleOutput (web browser)

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.