Using CodeProtect

Script code blocks may be safely inserted into an editable region using CodeProtect. These script code blocks are represented in the editor interface by a red question mark icon. This icon is shown in the figure below:

CodeProtect icon

Figure 1: CodeProtect icon


CodeProtect regions may be inserted or edited by clicking on the CodeProtect button in the editor toolbar, as shown in figure 2. This will open the CodeProtect editor window.

CodeProtect button

Figure 2: CodeProtect editor button


Whether creating a new CodeProtect region or editing a new one, code blocks are entered into the CodeProtect window, as shown in the following figure:

CodeProtect editor window

Figure 3: CodeProtect editor window


Pressing the “update” or “insert” button will insert the code block as a red CodeProtect icon in the editor. New CodeProtect regions are inserted at the current cursor location in the editor.


2.  Limitations

The purpose of CodeProtect is to allow users the ability to insert PHP, ASP, or JSP code into an editable region. ASP and JSP code must use the <%  -  %> processing instruction notation. PHP must use the <?php  -  ?> or <?  -  ?> notation.

If the page is a publish control file (PCF) or any other type of XML implementation, then only PHP code blocks are allowed. This is because the ASP and JSP <%  - %> tagging is invalid XML. PHP blocks, on the other hand, are valid XML preprocessing instructions. XSL transformation of PHP code blocks is successful, but it will fail for ASP and JSP.

Was this page helpful?

Additional Comments:

(Include your email address if you would like a reply)

Procede to