1
bjarkekr
How to use wysiwyg editor in module
  • 2005/8/23 10:48

  • bjarkekr

  • Just popping in

  • Posts: 24

  • Since: 2005/8/10


Hi!

I have created my own module, but how do I use the build in wysiwyg editor in it??

Or if I can implement spaw or FCK editor just as easy that would be even better..

Thanks in advance.

2
zoullou
Re: How to use wysiwyg editor in module
  • 2005/8/23 12:31

  • zoullou

  • Quite a regular

  • Posts: 250

  • Since: 2004/3/2 0


For which version of XOOPS is your module ?

3
bjarkekr
Re: How to use wysiwyg editor in module
  • 2005/8/24 8:54

  • bjarkekr

  • Just popping in

  • Posts: 24

  • Since: 2005/8/10


version 2.0.13

4
zoullou
Re: How to use wysiwyg editor in module
  • 2005/8/24 10:06

  • zoullou

  • Quite a regular

  • Posts: 250

  • Since: 2004/3/2 0


Ok, I don't know for XOOPS 2.0.x

Sorry

5
bjarkekr
Re: How to use wysiwyg editor in module
  • 2005/8/24 11:15

  • bjarkekr

  • Just popping in

  • Posts: 24

  • Since: 2005/8/10


which version do you know how to do it for??

Maybe it will help me anyway...

6
bjarkekr
Re: How to use wysiwyg editor in module
  • 2005/8/25 7:09

  • bjarkekr

  • Just popping in

  • Posts: 24

  • Since: 2005/8/10


can someone please answer.. somebody must know it ;)

7
zoullou
Re: How to use wysiwyg editor in module
  • 2005/8/25 7:30

  • zoullou

  • Quite a regular

  • Posts: 250

  • Since: 2004/3/2 0


With XOOPS 2.2, i make a form with wysiwyg like this :
if(!empty($_POST['editor']) || !empty($_COOKIE['editor'])) {
    if(!empty(
$_POST['editor'])) {
        
$editor $_POST['editor'];
    } else {
        
$editor $_COOKIE['editor'];
    }
} else {
    
$editor "";
}
if(!empty(
$editor)){
    
setcookie("editor",$editor);
}
$form->addElement(new XoopsFormSelectEditor($form'editor'$editor));
$options['name'] ='event_desc';
$options['value'] = empty($_REQUEST['message']) ? '' $_REQUEST['message'];
$form->addElement(new XoopsFormEditor("Description"$editor$options), false);


Cheers

8
wtravel
Re: How to use wysiwyg editor in module

In 2.0.x we need to put an extra folder named "wysiwyg" inside the class folder.

In the file you wish to use the koivi editor, you state the following line where the other main includes are stated:

include XOOPS_ROOT_PATH "/class/wysiwyg/formwysiwygtextarea.php";


If you would like to use only a few buttons you can insert a line like:
$options= array
(
"fontname","fontsize","formatblock","forecolor","hilitecolor","newline",
"undo","redo","separator","cut","copy","paste","separator","bold",
"italic","underline","strikethrough","removeformat","separator","justifyleft",
"justifycenter","justifyright","justifyfull","separator","insertorderedlist",
"insertunorderedlist","indent","outdent","newline","superscript","subscript",
"separator","quote","code","separator","createlink","unlink","separator",
"inserthorizontalrule","createtable","imagemanager","insertimage","imageproperties"
);

Then to use the editor in a form ($form) insert these lines:
$form->addElement(new XoopsFormWysiwygTextArea(_MD_DESCRIPTION"fieldname"$initial_value'100%''400px',$options) );


I do not know where the files you need can be found at the moment. If you like I can send you a zip file with the wysiwyg folder.

9
bjarkekr
Re: How to use wysiwyg editor in module
  • 2005/8/25 14:33

  • bjarkekr

  • Just popping in

  • Posts: 24

  • Since: 2005/8/10


thanks for the answers..

I found out myself how to use the build in wysiwyg with XOOPS forms... I also found out how to use FCK editor..

thanks a lot for the answers anyway, they sure will help someone else.

10
jdhf99
Re: How to use wysiwyg editor in module
  • 2005/8/27 16:18

  • jdhf99

  • Just popping in

  • Posts: 6

  • Since: 2004/9/9 1


Hey, this thread helped me alot, I added wysiwyg to my news posting, as my site is a poetry site, but is there a way to also get it working in the EDIT NEWS section when it brings you into the ADMIN section for editing? Right now it still uses the html code display, so any news{poem} item with a lot of editing comes up with lots of code and is hard to edit.

I am using XOOPS 2.0.10

The file /news/admin/storyform.inc is what I think I need to edit, but its layout differs greatly form the /news/include/storyform.inc file.

http://www.trupoets.com/xoops

Login

Who's Online

193 user(s) are online (76 user(s) are browsing Support Forums)


Members: 0


Guests: 193


more...

Donat-O-Meter

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

Latest GitHub Commits