1
RyaJ
How do I add the Xoops editor in PHP?
  • 2009/7/20 17:25

  • RyaJ

  • Just popping in

  • Posts: 3

  • Since: 2009/7/20


I want to add this editor instead of a simple textarea, since it does not detect linebreaks.

I tried with this :

le="color: #000000"><?php include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; $textarea = new XoopsFormDhtmlTextArea("Description", 'desc', $predata['description'], 15, 70); $textarea->doHtml = true; echo addElement($textarea, true);


Error :
Fatal error: Call to undefined function addElement()

Thanks.

EDIT : Forget it, now is working :P :
le="color: #000000"><?php include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; $my_form = new XoopsThemeForm("Add", "form", "form.php"); $my_form->addElement(new XoopsFormDhtmlTextArea("Description", 'desc', $predata['descripcion'], 15, 70), true); $my_form->display();

2
anderssk
Re: How do I add the Xoops editor in PHP?
  • 2009/7/21 18:56

  • anderssk

  • Quite a regular

  • Posts: 335

  • Since: 2006/3/21


Even that you got it working, I don't understand what you have done.
Is the code taken from a modul?

You can (if you are using version 2.3.3) change the editor for all modules
Edit the file /xoops_data/configs/xoopsconfig.php

Look for
le="color: #000000"><?php //"editor" => "fckeditor", //"editor" => "dhtmlext", /**#@-*/


and change to (for using dhtmlext)
le="color: #000000"><?php //"editor" => "fckeditor", "editor" => "dhtmlext", /**#@-*/



3
culex
Re: How do I add the Xoops editor in PHP?
  • 2009/7/21 21:55

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


Looks like this is from a module. Maybe he wants to use this editor in one module only :)
Programming is like sex:
One mistake and you have to support it for the rest of your life.

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits