Contentserv PHP API

CSGuiIdmlEditor extends CSGuiComponent
in package

The CSGuiComponent is the root class of all CSGui classes and represents any HTML representable component

The usage of all CSGui classes is the same:

  • Get an object through a call to the corresponding CSGui::create[Component]
  • Configure the object by setter functions
  • Output custom HTML where ever you like
  • Finally call the getHtml method on the object and echo the returned html code

The CSGuiComponent delivers therefore only the makeHtml function as well as popup handler code.

Tags

Table of Contents

$isDisabled  : mixed
$isPortal  : mixed
$popup  : mixed
$popupIDField  : mixed
$popupUrl  : mixed
__construct()  : mixed
[Enter Description]
addCSSCode()  : void
Adds a css snippet to the windows internal css code as they are used in the head Note that links to urls within the file must be relative to the forward.php
addCSSLink()  : void
Adds a link to the windows external cascading style sheets Note that - that the admin.css is included by default - the link to the file is from the browsers point of view relative to the forward.php - that links to urls within the file are relative to the css file location.
addEditorToolbarButton()  : void
adds custom buttons to the editor toolbar
addEditorToolbarSeparator()  : void
adds a separator to the editor toolbar button
addEventListener()  : void
adds an event listener to the editor
addJSAPI()  : void
Preloads a js API library instead of using CS.loadAPI in the code
addJSCode()  : void
Adds a js code snippet to the windows internal js scripts as they are used in the head or directly to the component
addJSLink()  : void
Adds a link to the windows external js scripts Note that the link to the file is from the browsers point of view relative to the forward.php
addJSUtils()  : void
Preloads a js util library instead of using CS.loadUtils in the code
deactivateOnLeaveMessage()  : void
this method deactivates the warning message that appears if the editor content has been changed without saving it
enableJQuery()  : void
Enables JQuery by loading all required libraries
enableJQueryEasy()  : void
Enables JQuery easy by loading all required libraries (experimental only)
enableJQueryPlugin()  : bool
Enables jQuery plugin.
enableJQueryUI()  : void
Enables JQuery UI by loading all required libraries (experimental only)
enablePluginCalls()  : mixed
Enables / disables all calls to CSGuiComponent plugins, if it is not wanted
getContent()  : mixed
getController()  : object
returns the controller of this gui component
getCssClassPrefix()  : mixed
returns the idml css class selector prefix
getGroupStyleTable()  : mixed
getHtmlContent()  : mixed
getIdmlFromHtml()  : string
transforms html to idml
getIdmlStyles()  : CSIdmlDocument
returns the idml document styles
getStyleName()  : mixed
isPortal()  : bool
Returns whether the component is used in the portal
makeEditorHtml()  : string
Generates the editor area html.
makeFormattingAreaHtml()  : string
Generates the formatting area html.
makeForwardUrl()  : mixed
makeHtml()  : string
generates the editor area and formatting area html code
popupAddCheckboxItem()  : void
Adds a checkbox popup item to the end of the current component's popup
popupAddItem()  : void
Adds a popup item to the end of the current component's popup
popupAddJavascriptFunction()  : void
Adds a Javascript method to the components Javascript which can be used to display a popup.
popupAddSeparator()  : void
Adds a popup separator item to the end of the current component's popup
popupAddSubMenuDefinition()  : void
Adds a definition (Icon, GroupIdentifier, GroupIndex) for a sub menu entry.
popupEnableDebugMode()  : mixed
popupEvaluateCode()  : mixed
Provides a condition which must be true if the popup item should be available
popupGetJavascript()  : string
Creates a javascript onContext='...' code, which can be inserted in a html component
popupGetMultipleRequestID()  : bool
This function may be used to check whether the request is a popupRequest for multiple elements.
popupGetRequestID()  : string
If a user request a popup the id describing the kind of request is returned here This function may also be used to check whether the request is a popupRequest.
popupInsertItem()  : void
Adds a popup item into a specified location of the current component's popup
popupMakeHtml()  : mixed
Creates the final popup html code
popupRemoveAllItems()  : void
Completely removes all popup items from the component
popupRemoveItem()  : void
Remove one items from the popup for the component
popupRemoveItemsByNamespace()  : void
Remove multiple from the popup specified by the namespace. All items having all the passed namespaces will be removed even if they are having more than the passed.
popupSetCharset()  : string
Sets the encoding for the popup components
popupSetDefaultPopup()  : void
Sets the default popup for the component
popupSetRequestID()  : void
Overwrites the id returned by popupSetRequestID
popupSetUrl()  : void
Changes the url where the popup should be loaded from.
popupSetVisible()  : void
Enables or disables the visiblity of the popup.
popupUseDefaultItem()  : void
Adds a standard popup item to the end of the current component's popup
setAvailableCharacterStyles()  : void
sets the character styles that should be available in the formatting area
setAvailableParagraphStyles()  : void
sets the paragraph styles that should be available in the formatting area
setContent()  : void
sets the html content of the editor
setController()  : void
sets the controller for the gui component
setCssClassPrefix()  : void
Sets the idml css class selector prefix
setDarkerWhiteText()  : void
if this value is true, the idml editor darkers white text for better readability
setEditable()  : void
Defines whether the editor area is editable or not.
setHeight()  : void
Sets the height of the editor area.
setLoadOnDemand()  : void
Sets the load on demand to this editor.
setMaxTextSize()  : void
sets the maximal text size for the editor. Text that has a bigger text size will be displayed smaller sized (this has no effect on the idml content itself)
setMinTextSize()  : void
sets the minimal text size for the editor. Text that has a smaller text size will be displayed bigger sized (this has no effect on the idml content itself)
setName()  : void
sets the name of the editor
setOnAfterSave()  : void
"this" scope is the current editor.
setOnBeforeSave()  : void
"this" scope is the current editor.
setOnSaveJS()  : void
Overwrite the default js save method call with passed function
setOriginalText()  : void
sets the original text in the formatting area
setPortalMode()  : void
Sets the component to the browsers portal
setSpellCheckLangID()  : void
Sets the language id for the spell checking feature of the editor.
setTableResizeAllowed()  : void
setTextPosition()  : void
Sets the text position the editor area should scroll to when initialized.
setToolbarVisible()  : void
sets the toolbar visibility
showAllButtons()  : void
makes it possible to set the visibility of all toolbar buttons at once
showCellStyles()  : void
defines whether the cell styles tab is shown in the formatting area
showCharacterStyles()  : void
defines whether the character styles tab is shown in the formatting area
showFootNotesButton()  : void
defines whether the footnotes button is showed in the toolbar
showNotesButton()  : void
defines whether the notes button is showed in the toolbar
showOriginalText()  : void
defines whether the original text tab is shown in the formatting area
showParagraphStyles()  : void
Defines whether the paragraph styles tab is shown in the formatting area.
showSaveButton()  : void
Defines whether the save is showed in the toolbar.
showSourceButton()  : void
Defines whether the source button is showed in the toolbar.
showSpecialCharacterButton()  : void
defines whether the special character button is showed in the toolbar
showSpellCheckerButton()  : void
Defines whether the spell checker button is showed in the toolbar
showStyles()  : void
defines whether style tabs are shown in the formatting area
showTab()  : void
defines whether the original text tab is shown in the formatting area
showTableStyles()  : void
defines whether the table styles tab is shown in the formatting area
showXmlTags()  : void
Defines whether the xml tag tab is shown in the formatting area.
throwError()  : void
Throws a CSException

Properties

$isDisabled

public mixed $isDisabled = \false
Tags
access

private

Methods

__construct()

[Enter Description]

public __construct(CSIdmlDocument $oIdml) : mixed
Parameters
$oIdml : CSIdmlDocument
Tags
Return values
mixed

addCSSCode()

Adds a css snippet to the windows internal css code as they are used in the head Note that links to urls within the file must be relative to the forward.php

public addCSSCode(string $sCode) : void
Parameters
$sCode : string

the code of the css without any <style> elements

Tags
access

public

Return values
void

Adds a link to the windows external cascading style sheets Note that - that the admin.css is included by default - the link to the file is from the browsers point of view relative to the forward.php - that links to urls within the file are relative to the css file location.

public addCSSLink(string $sCsslink) : void
Parameters
$sCsslink : string

the href of the css file

Tags
access

public

Return values
void

addEditorToolbarButton()

adds custom buttons to the editor toolbar

public addEditorToolbarButton(string $sName, string $icon, string $title, string $onclick) : void
Parameters
$sName : string

A unique name for the button

$icon : string

path to the icon to show in the toolbar. Relative to admin folder e.g. '../admin/images/check.png'

$title : string

the title of the toolbar button

$onclick : string

the javascript code to evaluate onclick

Tags
access

public

Return values
void

addEditorToolbarSeparator()

adds a separator to the editor toolbar button

public addEditorToolbarSeparator() : void
Tags
access

public

Return values
void

addEventListener()

adds an event listener to the editor

public addEventListener(string $event, string $jsCode) : void
Parameters
$event : string

the name of the event

$jsCode : string

the js code to be executed when the given event is fired

Tags
access

public

Return values
void

addJSAPI()

Preloads a js API library instead of using CS.loadAPI in the code

public addJSAPI(string $api) : void
Parameters
$api : string

the name of the CS API library in the ../admin/modules/[MODULE]/CS[MODULE].js directory

Tags
access

public

Return values
void

addJSCode()

Adds a js code snippet to the windows internal js scripts as they are used in the head or directly to the component

public addJSCode(string $sCode) : void
Parameters
$sCode : string

the code of the js without any <javasctipt> elements

Tags
access

public

Return values
void

Adds a link to the windows external js scripts Note that the link to the file is from the browsers point of view relative to the forward.php

public addJSLink(string $sHref) : void
Parameters
$sHref : string

the href of the js

Tags
access

public

Return values
void

addJSUtils()

Preloads a js util library instead of using CS.loadUtils in the code

public addJSUtils(string $util) : void
Parameters
$util : string

the name of the CS Util library in the ../admin/core/utils/js/ directory

Tags
access

public

Return values
void

deactivateOnLeaveMessage()

this method deactivates the warning message that appears if the editor content has been changed without saving it

public deactivateOnLeaveMessage() : void
Tags
access

public

Return values
void

enableJQuery()

Enables JQuery by loading all required libraries

public enableJQuery() : void
Tags
Return values
void

enableJQueryEasy()

Enables JQuery easy by loading all required libraries (experimental only)

public enableJQueryEasy() : void
Tags
Return values
void

enableJQueryPlugin()

Enables jQuery plugin.

public enableJQueryPlugin(string $sPluginName) : bool

For possible plugins see ADMIN_LOCAL/lib/javascript/jquery/plugins subfolder.

Parameters
$sPluginName : string

The name of the jquery plugin (case sensitive) and without the "jquery." prefix. To load the jquery.cookie.js plugin give only "cookie" as param.

Tags
Return values
bool

Whenever the plugin path was found or not.

enableJQueryUI()

Enables JQuery UI by loading all required libraries (experimental only)

public enableJQueryUI() : void
Tags
Return values
void

enablePluginCalls()

Enables / disables all calls to CSGuiComponent plugins, if it is not wanted

public static enablePluginCalls([bool $enabled = false ]) : mixed
Parameters
$enabled : bool = false

whether plugin calls may be used

Tags
Return values
mixed

getContent()

public getContent() : mixed
Tags
access

protected

Return values
mixed

getController()

returns the controller of this gui component

public getController() : object
Tags
access

public

Return values
object

the controller of the gui component

getCssClassPrefix()

returns the idml css class selector prefix

public getCssClassPrefix() : mixed

return string

Tags
Return values
mixed

getGroupStyleTable()

public static getGroupStyleTable(mixed $group, mixed $type[, mixed $onclick = '' ]) : mixed
Parameters
$group : mixed
$type : mixed
$onclick : mixed = ''
Tags
access

private

Return values
mixed

getHtmlContent()

public getHtmlContent() : mixed
Tags
Return values
mixed

getIdmlFromHtml()

transforms html to idml

public static getIdmlFromHtml(mixed $idml, mixed $html) : string
Parameters
$idml : mixed
$html : mixed
Tags
access

public

Return values
string

the resulting idml dom

getIdmlStyles()

returns the idml document styles

public getIdmlStyles() : CSIdmlDocument
Tags
access

public

Return values
CSIdmlDocument

getStyleName()

public static getStyleName(mixed $self[, mixed $translate = true ]) : mixed
Parameters
$self : mixed
$translate : mixed = true
Tags
access

private

Return values
mixed

isPortal()

Returns whether the component is used in the portal

public static isPortal() : bool
Tags
access

protected

Return values
bool

whether the portal mode is activated

makeEditorHtml()

Generates the editor area html.

public makeEditorHtml() : string
Tags
access

public

Return values
string

makeFormattingAreaHtml()

Generates the formatting area html.

public makeFormattingAreaHtml() : string
Tags
access

public

Return values
string

the generated html code

makeForwardUrl()

public static makeForwardUrl(mixed $url[, mixed $useRequestParams = array() ]) : mixed
Parameters
$url : mixed
$useRequestParams : mixed = array()
Tags
access

protected

Return values
mixed

makeHtml()

generates the editor area and formatting area html code

public makeHtml() : string
Tags
access

public

Return values
string

the generated html code

popupAddCheckboxItem()

Adds a checkbox popup item to the end of the current component's popup

public popupAddCheckboxItem(mixed $sLabel, mixed $sJavascript[, mixed $bIsEnabled = true ][, mixed $bIsSelected = false ][, mixed $sAccessKey = '' ][, mixed $bEvalCondition = true ][, mixed $mNamespaces = array() ][, mixed $sGroupIdentifier = '' ], mixed $iGroupIndex) : void
Parameters
$sLabel : mixed
$sJavascript : mixed
$bIsEnabled : mixed = true
$bIsSelected : mixed = false
$sAccessKey : mixed = ''
$bEvalCondition : mixed = true
$mNamespaces : mixed = array()
$sGroupIdentifier : mixed = ''
$iGroupIndex : mixed
Tags
access

public

Return values
void

popupAddItem()

Adds a popup item to the end of the current component's popup

public popupAddItem(string $sLabel[, string $sJavascript = '' ][, int $bIsEnabled = true ][, string $sIconPath = '' ][, string $sAccessKey = '' ][, bool $bEvalCondition = true ][, array<string|int, mixed>|string $mNamespaces = array() ][, string $sGroupIdentifier = '' ], int $iGroupIndex) : void
Parameters
$sLabel : string

label of the popup item. It can use '//' to create a submenu, e.g. 'submenu_label//sub_submenu_label//label'

$sJavascript : string = ''

Javascript code to call with the popup item

$bIsEnabled : int = true

can be false if the popup item should be visible but disabled

$sIconPath : string = ''

Image of the item relative to the admin/images/popup/ directory

$sAccessKey : string = ''

Keyboard access key of the popup item

$bEvalCondition : bool = true

If the condition should be evaluated.

$mNamespaces : array<string|int, mixed>|string = array()

The namespace for the button like "workflow"

$sGroupIdentifier : string = ''

The identifier to add the popup item to a group, which has separator at the beginning and at the end.

$iGroupIndex : int

The index of the group. The index will be used to order the groups. The lowest index will be taken of all popup items inside of a group.

Tags
access

public

Return values
void

popupAddJavascriptFunction()

Adds a Javascript method to the components Javascript which can be used to display a popup.

public popupAddJavascriptFunction([string $jsName = 'displayComponentPopup' ]) : void

It can be called with the given name and the requested POPUPID and event (event object) as argument, e.g. displayComponentPopup(ID, event)

Parameters
$jsName : string = 'displayComponentPopup'

the name of the Javascript method, if it should be different from the standard 'displayComponentPopup'

Tags
Return values
void

popupAddSeparator()

Adds a popup separator item to the end of the current component's popup

public popupAddSeparator([string $evalCondition = true ][, string $subMenu = '' ]) : void
Parameters
$evalCondition : string = true

optional php condition to be evaluated as true to let the popup item be available

$subMenu : string = ''

optional sub menu the separator should be placed within. It can use '//' to add the seperator within a submenu, e.g. 'submenu_label//subsubmenu_label'

Tags
access

public

Return values
void

popupAddSubMenuDefinition()

Adds a definition (Icon, GroupIdentifier, GroupIndex) for a sub menu entry.

public popupAddSubMenuDefinition(string $sSubMenuLabel, string $sIcon[, string $sGroupIdentifier = '' ], int $iGroupIndex) : void
Parameters
$sSubMenuLabel : string

The target sub menu label

$sIcon : string

THe icon of the sub menu.

$sGroupIdentifier : string = ''

The group identifier

$iGroupIndex : int

The index of the group.

Tags
Return values
void

popupEnableDebugMode()

public popupEnableDebugMode() : mixed
Tags
access

private

Return values
mixed

popupEvaluateCode()

Provides a condition which must be true if the popup item should be available

public popupEvaluateCode(mixed $evalCode) : mixed

Sometimes it is necessary to evaluate further code to define a $evalCondition. As the condition only returns one value, this can not be done there. Therefore any phpCode can be evaluated using the popupEvaluateCode method. Here e.g. conditions can be stored in variables which can be used in the $evalCondition later. {RecordID} can be used to get the id of the current selected item

Parameters
$evalCode : mixed
Tags
access

public

Return values
mixed

popupGetJavascript()

Creates a javascript onContext='...' code, which can be inserted in a html component

public popupGetJavascript(string $id[, string $innerHtml = "" ][, string $elementName = 'span' ][, string $embedAttribute = 'oncontextmenu' ][, string $additionalAttributes = "" ][, string $popupUrl = '' ][, string $popupIDField = '' ][, string $jsCode = '' ]) : string
Parameters
$id : string

The value which will can be received using the popupGetRequestID() method

$innerHtml : string = ""

The content of the optional html element is not empty. If this value is not set the $id is used instead

$elementName : string = 'span'

An optional html element name which will contain the attribute

$embedAttribute : string = 'oncontextmenu'

The attribute which should contain the JavaScript code

$additionalAttributes : string = ""

Additional attributes which should be additionally added to the oncontext command

$popupUrl : string = ''

Overwrites the standard url where the popup is defined

$popupIDField : string = ''

Overwrites the standard IDField for the popup which will be added to the request and is necessary to get the results using the popupGetRequestID method if it has been modified

$jsCode : string = ''

The JavaScript code which should be evaluated before the contextmenu is shown

Tags
Return values
string

The JavaScript code or a complete html element which will create the popup request

popupGetMultipleRequestID()

This function may be used to check whether the request is a popupRequest for multiple elements.

public popupGetMultipleRequestID() : bool
Tags
Return values
bool

whether a popup request for multiple items have been sent

popupGetRequestID()

If a user request a popup the id describing the kind of request is returned here This function may also be used to check whether the request is a popupRequest.

public popupGetRequestID() : string
Tags
Return values
string

the ID for which a popup is requested

popupInsertItem()

Adds a popup item into a specified location of the current component's popup

public popupInsertItem(mixed $mIndex, mixed $sLabel[, mixed $sJavascript = '' ][, mixed $bIsEnabled = true ][, mixed $sIconPath = '' ][, mixed $sAccessKey = '' ][, mixed $bEvalCondition = true ][, mixed $mNamespaces = array() ][, mixed $sGroupIdentifier = '' ], mixed $iGroupIndex) : void
Parameters
$mIndex : mixed
$sLabel : mixed
$sJavascript : mixed = ''
$bIsEnabled : mixed = true
$sIconPath : mixed = ''
$sAccessKey : mixed = ''
$bEvalCondition : mixed = true
$mNamespaces : mixed = array()
$sGroupIdentifier : mixed = ''
$iGroupIndex : mixed
Tags
access

public

Return values
void

popupMakeHtml()

Creates the final popup html code

public popupMakeHtml(mixed $PopupID) : mixed
Parameters
$PopupID : mixed
Tags
access

protected

Return values
mixed

popupRemoveAllItems()

Completely removes all popup items from the component

public popupRemoveAllItems([array<string|int, mixed> $keep = array() ][, bool $recursive = false ]) : void
Parameters
$keep : array<string|int, mixed> = array()

the labels of the items which may be kept

$recursive : bool = false

whether this action should be applied to all subcomponents as subtrees in CSGuiMixedTrees

Tags
access

public

Return values
void

popupRemoveItem()

Remove one items from the popup for the component

public popupRemoveItem(string $label[, string|bool $evalCondition = true ][, array<string|int, mixed>|string $aNamespaces = array() ]) : void
Parameters
$label : string

label of the popup item

$evalCondition : string|bool = true

optional php condition to be evaluated as true to let the popup item be available {RecordID} can be used to get the id of the current selected item

$aNamespaces : array<string|int, mixed>|string = array()

Either a simple string for a namespace like "workflow" or an array for further specification like array("Workflow", "123"). All items having the same label and all namespaces passed set (even if they are having more) will be removed.

Tags
access

public

Return values
void

popupRemoveItemsByNamespace()

Remove multiple from the popup specified by the namespace. All items having all the passed namespaces will be removed even if they are having more than the passed.

public popupRemoveItemsByNamespace([array<string|int, mixed> $aNamespaces = array() ]) : void
Parameters
$aNamespaces : array<string|int, mixed> = array()

An array containing all the defined namespaces for the popup items to be removed

Tags
Return values
void

popupSetCharset()

Sets the encoding for the popup components

public popupSetCharset(mixed $charset) : string
Parameters
$charset : mixed
Tags
Return values
string

$charset the new characterset

popupSetDefaultPopup()

Sets the default popup for the component

public popupSetDefaultPopup(CSGuiPopup $popup) : void
Parameters
$popup : CSGuiPopup

Popup object to use as popup for the component

Tags
access

protected

Return values
void

popupSetRequestID()

Overwrites the id returned by popupSetRequestID

public popupSetRequestID(string $id) : void
Parameters
$id : string

the value of the id to overwrite

Tags
Return values
void

popupSetUrl()

Changes the url where the popup should be loaded from.

public popupSetUrl([string $popupUrl = '' ][, string $idField = 'POPUP_ID' ][, bool $recursive = false ]) : void

It can be set if the pure forward name is not sufficient or another file should be used for a popup request This is an important option to add additional GET parameters, which should be available again for popups You can add additionalParameters to the forward url using the & seperator, e.g 'destination.php&param1=true'

Parameters
$popupUrl : string = ''

the url where the popup is defined

$idField : string = 'POPUP_ID'

the IDField for the popup which will be added to the request and is necessary to get the results using the popupGetRequestID method if it has been modified

$recursive : bool = false

whether this action should be applied to all subcomponents as subtrees in CSGuiMixedTrees

Tags
access

public

Return values
void

popupSetVisible()

Enables or disables the visiblity of the popup.

public popupSetVisible([bool $visibility = null ]) : void

If a popupAddItem is called before, the popup is automatically set to visible . If you only create the popup menu when recieving the popupGetRequestID parameter you have to enable the popup menu manually. You can even hide the popup completly be setting the $visibility to false

Parameters
$visibility : bool = null

whether the component has a visible popup menu

Tags
access

public

Return values
void

popupUseDefaultItem()

Adds a standard popup item to the end of the current component's popup

public popupUseDefaultItem(string $label[, string|bool $evalCondition = true ]) : void

The popupitems defined using the popupSetDefaultPopup can be reused after popupRemoveAllItems has been called. This offers the possibility to reuse working popupitems in a userdefined popupmenu The type of popup item which should be used is defined by the $label parameter. This label represents the label of the original item

Parameters
$label : string

label of the popup item

$evalCondition : string|bool = true

php condition to be evaluated as true to let the popup item be available

Tags
access

public

Return values
void

setAvailableCharacterStyles()

sets the character styles that should be available in the formatting area

public setAvailableCharacterStyles(array<string|int, mixed> $characterStyles) : void
Parameters
$characterStyles : array<string|int, mixed>

the styles as array of names or array of ids

Tags
access

public

Return values
void

setAvailableParagraphStyles()

sets the paragraph styles that should be available in the formatting area

public setAvailableParagraphStyles(array<string|int, mixed> $paragraphStyles) : void
Parameters
$paragraphStyles : array<string|int, mixed>

the styles as array of names or array of ids

Tags
access

public

Return values
void

setContent()

sets the html content of the editor

public setContent(string $html) : void
Parameters
$html : string

the html code to be set as content of the editor

Tags
access

public

Return values
void

setController()

sets the controller for the gui component

public setController(object $oController) : void
Parameters
$oController : object

the controller for the gui component

Tags
access

public

Return values
void

setCssClassPrefix()

Sets the idml css class selector prefix

public setCssClassPrefix(string $sPrefixSelector) : void
Parameters
$sPrefixSelector : string
Tags
Return values
void

setDarkerWhiteText()

if this value is true, the idml editor darkers white text for better readability

public setDarkerWhiteText(bool $darker) : void
Parameters
$darker : bool

whether to darker white text or not

Tags
access

public

Return values
void

setEditable()

Defines whether the editor area is editable or not.

public setEditable(bool $editable[, bool $visible = FALSE ]) : void
Parameters
$editable : bool

If true the editor area is editable, otherwise not.

$visible : bool = FALSE

If the editor should be disabled this parameter defines whether the whole editor is shown or only the content without the editor itself.

Tags
access

public

Return values
void

setHeight()

Sets the height of the editor area.

public setHeight(string $height) : void
Parameters
$height : string

The height of the editor

Tags
access

public

Return values
void

setLoadOnDemand()

Sets the load on demand to this editor.

public setLoadOnDemand(bool $bool) : void
Parameters
$bool : bool

If set to true the editor will be loaded on demand (onclick on text) Default is false

Tags
Return values
void

setMaxTextSize()

sets the maximal text size for the editor. Text that has a bigger text size will be displayed smaller sized (this has no effect on the idml content itself)

public setMaxTextSize(int $size) : void
Parameters
$size : int

the text size in points

Tags
access

public

Return values
void

setMinTextSize()

sets the minimal text size for the editor. Text that has a smaller text size will be displayed bigger sized (this has no effect on the idml content itself)

public setMinTextSize(int $size) : void
Parameters
$size : int

the text size in points

Tags
access

public

Return values
void

setName()

sets the name of the editor

public setName(string $name) : void
Parameters
$name : string

the name of the editor

Tags
access

public

Return values
void

setOnAfterSave()

"this" scope is the current editor.

public setOnAfterSave(mixed $onSave) : void

available in "arguments":

  • "event" is the current event.
  • "editor" is the current editor
Parameters
$onSave : mixed
Tags
access

public

Return values
void

setOnBeforeSave()

"this" scope is the current editor.

public setOnBeforeSave(mixed $onBeforeSave) : void

available in "arguments":

  • "event" is the current event.
  • "editor" is the current editor
Parameters
$onBeforeSave : mixed
Tags
access

public

Return values
void

setOnSaveJS()

Overwrite the default js save method call with passed function

public setOnSaveJS(mixed $sJSCode) : void

"this" scope is the current editor Add "return false" to prevent default.

Parameters
$sJSCode : mixed
Tags
Return values
void

setOriginalText()

sets the original text in the formatting area

public setOriginalText(string $text) : void
Parameters
$text : string
Tags
access

public

Return values
void

setPortalMode()

Sets the component to the browsers portal

public static setPortalMode([mixed $isPortal = true ]) : void
Parameters
$isPortal : mixed = true
Tags
access

protected

Return values
void

setSpellCheckLangID()

Sets the language id for the spell checking feature of the editor.

public setSpellCheckLangID(int $iLangId) : void
Parameters
$iLangId : int
Tags
access

public

Return values
void

setTableResizeAllowed()

public setTableResizeAllowed(mixed $allow) : void
Parameters
$allow : mixed
Tags
access

public

Return values
void

setTextPosition()

Sets the text position the editor area should scroll to when initialized.

public setTextPosition(int $iPosition) : void
Parameters
$iPosition : int

the text position to scroll to

Tags
access

public

Return values
void

setToolbarVisible()

sets the toolbar visibility

public setToolbarVisible([bool $visible = true ]) : void
Parameters
$visible : bool = true

whether the toolbar should be visible or not

Tags
access

public

Return values
void

showAllButtons()

makes it possible to set the visibility of all toolbar buttons at once

public showAllButtons(bool $show) : void
Parameters
$show : bool

if true the buttons are visible, otherwise not

Tags
access

public

Return values
void

showCellStyles()

defines whether the cell styles tab is shown in the formatting area

public showCellStyles(bool $show) : void
Parameters
$show : bool

if true the tab is visible, otherwise not

Tags
access

public

Return values
void

showCharacterStyles()

defines whether the character styles tab is shown in the formatting area

public showCharacterStyles(bool $show) : void
Parameters
$show : bool

if true the tab is visible, otherwise not

Tags
access

public

Return values
void

showFootNotesButton()

defines whether the footnotes button is showed in the toolbar

public showFootNotesButton(bool $show) : void
Parameters
$show : bool

if true the button is visible, otherwise not

Tags
access

public

Return values
void

showNotesButton()

defines whether the notes button is showed in the toolbar

public showNotesButton(bool $show) : void
Parameters
$show : bool

if true the button is visible, otherwise not

Tags
access

public

Return values
void

showOriginalText()

defines whether the original text tab is shown in the formatting area

public showOriginalText(bool $show) : void
Parameters
$show : bool

if true the tab is visible, otherwise not

Tags
access

public

Return values
void

showParagraphStyles()

Defines whether the paragraph styles tab is shown in the formatting area.

public showParagraphStyles(bool $show) : void
Parameters
$show : bool

If true the tab is visible, otherwise not

Tags
throws
CSException
access

public

Return values
void

showSaveButton()

Defines whether the save is showed in the toolbar.

public showSaveButton(bool $show) : void
Parameters
$show : bool

If true the button is visible, otherwise not.

Tags
access

public

Return values
void

showSourceButton()

Defines whether the source button is showed in the toolbar.

public showSourceButton(bool $show) : void
Parameters
$show : bool

if true the button is visible, otherwise not

Tags
access

public

Return values
void

showSpecialCharacterButton()

defines whether the special character button is showed in the toolbar

public showSpecialCharacterButton(bool $show) : void
Parameters
$show : bool

if true the button is visible, otherwise not

Tags
access

public

Return values
void

showSpellCheckerButton()

Defines whether the spell checker button is showed in the toolbar

public showSpellCheckerButton(bool $show) : void
Parameters
$show : bool

If true the button is visible, otherwise not.

Tags
access

public

Return values
void

showStyles()

defines whether style tabs are shown in the formatting area

public showStyles(bool $show) : void
Parameters
$show : bool

if true the tabs are visible, otherwise not

Tags
access

public

Return values
void

showTab()

defines whether the original text tab is shown in the formatting area

public showTab(mixed $sCustomTabName, mixed $bShow) : void
Parameters
$sCustomTabName : mixed
$bShow : mixed
Tags
access

public

Return values
void

showTableStyles()

defines whether the table styles tab is shown in the formatting area

public showTableStyles(bool $show) : void
Parameters
$show : bool

if true the tab is visible, otherwise not

Tags
access

public

Return values
void

showXmlTags()

Defines whether the xml tag tab is shown in the formatting area.

public showXmlTags(bool $show) : void
Parameters
$show : bool

if true the tab is visible, otherwise not

Tags
access

public

Return values
void

throwError()

Throws a CSException

public static throwError(string $sMessage, int $iCode) : void
Parameters
$sMessage : string
$iCode : int
Tags
Return values
void

        

Search results