2009年7月23日星期四

Re: [fw-mvc] FKCeditor

Roozbeh,

FYI, Google actually has a 'suggestion' for this:
http://www.google.com/search?q=zend+framework+fckeditor

I have not used FCKeditor with ZF (1.8.4) but I placed Spaw Editor into
a view partial. I suppose having it in a Zend Form would be ideal however:

http://zfsnippets.com/snippets/view/id/55

I haven't tested the above script yet but here is what I'm currently
using with Spaw:

---------------------

/*
* APPLICATION_PATH/views/scripts/Spaw.phtml
* this is just the default path...
*/

<?php
require_once ( APPLICATION_PATH . "/../public/js/spaw2/spaw.inc.php" );
$editor = new SpawEditor($this->name, $this->content);
$editor->setDimensions($this->width, $this->height);
$editor->addToolbar($this->toolbar);
$editor->show();

---------------------

/*
* example view script
*/

<form action='/editor/process' method='post'>
<input type='hidden' id='id' name='id' value='<?= $this->id ?>' />
<div id='editor'>
<?= $this->partial('Spaw.phtml', array(
'name' => 'content',
'content' => stripslashes($this->content),
'width' => '600px',
'height' => '250px',
'toolbar' => 'My_Toolbar',
)); ?>
</div>
<input type='submit' value='submit' />
</form>

-------------------

Cmon Dijit!

Regards,

Kevin

Roozbeh Matloobi wrote:
> Hi,
>
> I installed a editor named FCKeditore. and I want to use for CMS interface.
> $oFCKeditor = new FCKeditor('FCKeditor1') ;
> var_dump($oFCKeditor);
> //print($oFCKeditor);
> $oFCKeditor->BasePath = $this->baseurl.'/library/fckeditor/' ;
> $oFCKeditor->Value = '<p>This is some <strong>sample text</strong>. You
> are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
> var_dump($oFCKeditor->Value);
> *$oFCKeditor->Create() ;*
>
> but I have this bug
> *Fatal error*: Uncaught exception 'Zend_Controller_Dispatcher_Exception'
> with message 'Invalid controller specified (library)' in
> C:\roozbeh\repo\newskool\repo\library\Zend\Controller\Dispatcher\Standard.php:241
> Stack trace: #0
> C:\roozbeh\repo\newskool\repo\library\Zend\Controller\Front.php(934):
> Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
> Object(Zend_Controller_Response_Http)) #1
> C:\roozbeh\repo\newskool\repo\htdocs\index.php(112):
> Zend_Controller_Front->dispatch() #2 {main} thrown in
> *C:\roozbeh\repo\newskool\repo\library\Zend\Controller\Dispatcher\Standard.php*
> on line *241
>
> much appriciate for any comments.
>
> Thanks,
> Roozbeh
> *
>

没有评论: