Jump to content

<textarea name="description" class="textbox fck">


SentiJB
 Share

Recommended Posts

Posted (edited)

In the admin skin's javascript file admin.js, somewhere near line 654. This selector starts/ends with:

$("textarea.fck").each(function() {
// code that determines how to start the editor
$(this).ckeditor(t)})

The javascript file that is the CKEditor utility is loaded via the admin skin template main.php. It is available to anything that wants to use it (meaning, it is not buried in the admin folder.

Edited by bsmither
  • Like 1
Link to comment
Share on other sites

So if i want to use it in front end. 

i need to copy paste this : 

$("textarea.fck").each(function() {
// code that determines how to start the editor
$(this).ckeditor(t)})

in common.js 

and i add : 

<!-- Include CKEditor -->
      <script type="text/javascript" src="includes/ckeditor/ckeditor.js"></script>
      <script type="text/javascript" src="includes/ckeditor/adapters/jquery.js"></script>
    

this in the template file i want it to use it in ?

 

Link to comment
Share on other sites

Please remind us what skin you are using.

You mentioned 'common.js'. That suggests you are using a CC5-type skin. Most, if not all, CC6 skins have there own folder of javascript files, and would add new code in one of its files. (Alternately, very recent versions of CC6 has a different method of enumerating javascript files.)

Technically, all you need to start the editor (in the same way CC6 does it) is:

$("textarea.fck").ckeditor([options])

This CKEditor Quick-Start Guide may be of interest.

https://ckeditor.com/docs/ckeditor4/latest/guide/dev_installation.html#adding-ckeditor-4-to-your-page

 

Link to comment
Share on other sites

Posted (edited)

I followed the instructions and the text editor box shows correctly.

if i post , the raw data is stored. 

  • How is the best way to alter the front end editor : only path of images when clicking browse server  ?
  • How can you disable source code ( so users cant fill in a script for example they can hack site )

 

 

Edited by SentiJB
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...