ProtectedSource.Add"

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

(New page: == ProtectedSource.Add == The editor offers a way to "protect" part of the source to remain untouched while editing or changing views. Just use the "FCKConfig.ProtectedSource.Add" configu...)
 
 
Line 1: Line 1:
== ProtectedSource.Add ==
+
The editor offers a way to "protect" part of the source to remain untouched while editing or changing views. Just use the "FCKConfig.ProtectedSource.Add" function in the configuration file.
  
The editor offers a way to "protect" part of the source to remain untouched while editing or changing views. Just use the "FCKConfig.ProtectedSource.Add" configuration option.
+
Note that there currently isn't any way to "lock" displayed content in the editor. The content protected with ProtectedSource will actually be invisible during editing. It may be used instead, for example, to protect custom non standard tags or server side scripts. By default, FCKeditor uses it to protect <script> tags from activation during editing.  
  
Note that there currently isn't any way to "lock" displayed content in the editor. The content protected with ProtectedSource will actually be invisible during editing. It may be used instead, for example, to protect custom non standard tags or server side scripts. By default, FCKeditor uses it to protect <script> tags from activation during editing.
+
Example for ASP style server side code:  
 
+
<pre>FCKConfig.ProtectedSource.Add( /&lt;%[\s\S]*?%&gt;/g )&nbsp;;
Example for ASP style server side code:
+
</pre>  
<pre>
+
Example for PHP style server side code:  
FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ;
+
<pre>FCKConfig.ProtectedSource.Add( /&lt;\?[\s\S]*?\?&gt;/g )&nbsp;;
</pre>
 
 
 
Example for PHP style server side code:
 
<pre>
 
FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ;
 
 
</pre>
 
</pre>

Latest revision as of 18:51, 28 May 2008

The editor offers a way to "protect" part of the source to remain untouched while editing or changing views. Just use the "FCKConfig.ProtectedSource.Add" function in the configuration file.

Note that there currently isn't any way to "lock" displayed content in the editor. The content protected with ProtectedSource will actually be invisible during editing. It may be used instead, for example, to protect custom non standard tags or server side scripts. By default, FCKeditor uses it to protect <script> tags from activation during editing.

Example for ASP style server side code:

FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ;

Example for PHP style server side code:

FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ;
This page was last edited on 28 May 2008, at 18:51.