Re: QuickForm: Need some help to integrate FCKeditor with QF

From: Date: Tue, 04 Jan 2005 10:20:23 +0000
Subject: Re: QuickForm: Need some help to integrate FCKeditor with QF
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16580@lists.php.net to get a copy of this message
Hi Thank you very much Justin. I created a fckeditor element that extends HTML_QuickForm_element. In the php script I register the new element type and add an element to the form: $form->registerElementType('fckeditor', 'HTML/QuickForm/fckeditor.php', 'HTML_QuickForm_fckeditor'); $form->addElement('fckeditor', 'notes'); I'm also using smarty too and in the template I have {$form_data.notes.html} . All fields are displayed except this one. In the toHtml() function I return the html and I think it's correct: <div><input type="hidden" id="fckeditor1" name="fckeditor1" value="aaaaaaaaaaaaaaaaaa"><input type="hidden" id="fckeditor1___Config" value=""><iframe id="fckeditor1___Frame" src="/rui/testes/forms/FCKeditor/editor/fckeditor.html?InstanceName=fckeditor1&Toolbar=Custom" width="700" height="300" frameborder="no" scrolling="no"></iframe></div> If I change return $html to echo $html in the toHtml()) function of the fckeditor element the editor is displayed but not in the position I want, of course. I can't find the bug now. Any suggestion? 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

« previous php.pear.general (#16580) next »