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 :

include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
$textarea = new XoopsFormDhtmlTextArea("Description"'desc'$predata['description'], 1570);
$textarea->doHtml true;
echo 
addElement($textareatrue);


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

Thanks.

EDIT : Forget it, now is working :P :
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'], 1570), 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
//"editor"    => "fckeditor",
//"editor"    => "dhtmlext",
/**#@-*/


and change to (for using dhtmlext)
//"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

Who's Online

187 user(s) are online (121 user(s) are browsing Support Forums)


Members: 0


Guests: 187


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits