Re: QuickForm: Need some help to integrate FCKeditor with QF
| From: | pt2002 | Date: | Tue, 04 Jan 2005 18:04:28 +0000 |
| Subject: | Re: QuickForm: Need some help to integrate FCKeditor with QF | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16593@lists.php.net to get a copy of this message | ||
Hi
I have this in fckeditor.php
<?php
require_once('HTML/QuickForm/element.php');
class HTML_QuickForm_fckeditor extends HTML_QuickForm_element
{
var stuff
[...]
function HTML_QuickForm_fckeditor($elementName=null, $elementLabel=null,
$options = null, $attributes=null)
{
HTML_QuickForm_element::HTML_QuickForm_element($elementName,
$elementLabel, $attributes);
$this->_persistantFreeze = true;
$this->_type = 'fckeditor';
if (is_array($options)) {
foreach ($options as $k => $v) {
if (isset($this->{"_$k"}) && method_exists($this,
"set$k")) {
$this->{"set$k"}($v);
}
}
}
$this->width = 700;
$this->height = 300;
}
"Justin Patrin" <papercrane@gmail.com> escreveu na mensagem
news:432beae05010409504ecda17@mail.gmail.com...
> On Tue, 4 Jan 2005 14:50:12 -0000, pt2002 <pt2002@mail.pt> wrote:
>> Hi
>>
>> I added the "print_r()" function of the form array to see how it was
>> created
>> and I noticed an "element_1" with the html of fckediotr creation.
>> Why does it get that name instead of notes and it's valued is not
>> displayed
>> after form submission?
>
> Did you set up a constructor for your element?
>
>>
>> Thanks in advance.
>>
>> Greetings
>>
>> "Justin Patrin" <papercrane@gmail.com> escreveu na mensagem
>> news:432beae041231132660fa112c@mail.gmail.com...
>> > On Thu, 30 Dec 2004 12:56:19 -0000, pt2002 <pt2002@mail.pt> wrote:
>> >> Hello
>> >>
>> >> I'm trying to add a new type of element 'fckeditor'. I look at a
>> >> piece
>> >> of
>> >> code that do the same but for htmlarea.
>> >> I'm getting an error:
>> >> Fatal error: Call to undefined method FCKeditor::onQuickFormEvent() in
>> >> /usr/local/lib/php/HTML/QuickForm.php on line 546
>> >>
>> >> I really need to get over this problem. The project I am re-designing
>> >> doesn't use QF and Smarty.
>> >> Now I have near 40 forms with QF & Smarty but some of them need to use
>> >> FCKeditor because it's the current wysiwyg editor.
>> >>
>> >> Thanks in advance.
>> >>
>> >
>> > Your fckeditor element should extend HTML_QuickForm_element.
>> >
>> > --
>> > Justin Patrin
>>
>
> --
> Justin Patrin