Topic: Help with fckEditor!! please...

Hi guys, im have an problem to display(textarea) or show the fckeditor in my api...
Anyone, how do integrated xajax with fckEditor?
Please help!

simple example index.php;

<?php
$core = './xajax/xajax_core';
require_once( $core . '/xajax.inc.php' );
$xajax = new xajax();
require_once( $core . '/xajaxPlugin.inc.php' );
require_once( $core . '/xajaxPluginManager.inc.php' );
require_once './xajax/xajax_plugins/response/modalWindow/modalWindow.inc.php';

include 'includes/_functions.php'; //functions PHP AJAX
include 'fckeditor/fckeditor.php'; //FCKeditor.

//and all functions registered for xajax here...
?>

now, my _functions.php; //PHP and AJAX.

<?php
function addNews() {
   $response = new xajaxResponse();

   $do = '<form name="formAddNews">';
   //here all inputs...
   //And here show textarea created with fckeditor!
   $do = '<input type="button" value="save" onClick="xajax_saveNews();">';
   $do = '</form>';

   $response->assign("myDiv_InIndexHtml", "innerHTML", $do);
   return $response;
}
?>

Thanks, any time.

Re: Help with fckEditor!! please...

i think you should call any js script to init the editor
i work with tinymce and there i have to do this

Bye

Oliver

3 (edited by ederson_mora 2009-03-27 12:47:22 PM)

Re: Help with fckEditor!! please...

ty, man... i try it.
cya!

Re: Help with fckEditor!! please...

hey man....

i put it in my head section index.php

<script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
                mode : "textareas",
                theme : "advanced",
                plugins : "table,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,contextmenu",
                theme_advanced_buttons1_add : "fontselect,fontsizeselect",
                theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",
                theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",
                theme_advanced_buttons3_add_before : "tablecontrols,separator",
                theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator",
                theme_advanced_toolbar_location : "top",
                theme_advanced_toolbar_align : "left",
                theme_advanced_statusbar_location : "bottom",
                plugin_insertdate_dateFormat : "%Y-%m-%d",
                plugin_insertdate_timeFormat : "%H:%M:%S",
                extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
                external_link_list_url : "example_data/example_link_list.js",
                external_image_list_url : "example_data/example_image_list.js",
                flash_external_list_url : "example_data/example_flash_list.js"
            });
        }
</script>

And in my _functions.php

function test() {
  $response = new xajaxResponse();
  $res .= '<textarea name="content"></textarea>';
  $res .= '<input type="submit" value="send" onClick=".......">';
  $response->assign("myDiv", "innerHTML", $res);
  return $response;
}

But doesn't work sad
If try without xajax, it works!

any ideia? ty

Re: Help with fckEditor!! please...

you should call that init function above...

Re: Help with fckEditor!! please...

Thanks very much..

Re: Help with fckEditor!! please...

can any tell how it works. its not working on my end