Description: Class for handling and displaying edit_area

version 1.0.0
author Timo Trautmann
copyright four for business AG <www.4fb.de> {@internal created 2008-05-07 }}

 Methods

Constructor of EditArea initializes class variables

EditArea(string $sId, string $sSyntax, string $sLang, boolean $bAddScript, array $aCfg, boolean $bEditable) 

access public

Parameters

$sId

string
  • The id of textarea which is replaced by editor

$sSyntax

string
  • Name of syntax highlighting which is used (html, css, js, php, ...)

$sLang

string
  • lang which is used into editor. Notice NOT Contenido language id ex: de, en ... To get it from contenido language use: substr(strtolower($belang), 0, 2) in backend

$bAddScript

boolean
  • defines if edit_area script is included or not interesting when there is more than only one editor on page

$aCfg

array
  • The contenido configuration array

$bEditable

boolean
  • Optional defines if content is editable or not

Function gets properties from contenido for edit_area and stores it into $this->setProperty so user is able to overwride standard settings or append other settings. Function also checks if edit_area is activated or deactivated by user

getSystemProperties() 

access private

Function renders js_script for inclusion into an header of a html file

renderScript() : string

access public

Returns

string- js_script for edit_area

Function for setting a property for edit_area to $this->setProperty existing properties were overwritten

setProperty(string $sName, string $sValue, boolean $bIsNumeric) 

access public

Parameters

$sName

string
  • Name of edit_area property

$sValue

string
  • Value of edit_area property

$bIsNumeric

boolean
  • Defines if value is numeric or not in case of a numeric value, there is no need to use quotes

 Properties

 

The contenido configuration array

$aCfg : array

access private
 

Properties which were used to init edit_area

$aProperties : array

access private
 

defines if textarea is used or not (by system/client/user property)

$bActivated : boolean

access private
 

defines if js-script for edit_area is included on rendering process

$bAddScript : boolean

access private
 

HTML-ID of textarea which is replaced by edit_area

$sTextareaId : string

access private