Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 10:33:30 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155529 Posts in 21713 Topics by 7737 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Adding two or more WYSIWYG_EDITOR(s) to a single page  (Read 542 times)
phillbooth

Offline Offline

Posts: 27


« on: November 30, 2009, 03:54:58 PM »

Hi, I’m trying to use the WYSIWYG_EDITOR script to update content on a page to update a database, getting one WYSIWYG_EDITOR to pull in content is fine, but I seem to get "Toolbar set "WBToolbar" doesn't exist" or just a PHP STOP if I try and include two... the code below displays one fine.

Any suggestions?:



Code:
           $content = $fetch_item['short_description'];
            $name = "description";
            $id = "short_description";
            $width = "98%";
            $height = "400px";
            if (!defined('WYSIWYG_EDITOR') OR WYSIWYG_EDITOR=="none" OR !file_exists(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php')) {
                function show_wysiwyg_editor($name,$id,$content,$width,$height) {
                    echo '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; height: '.$height.';">'.$content.'</textarea>';
                }
            } else {
                $id_list=array("description");
                require(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php');
            }        
            show_wysiwyg_editor($name,$id,$content,$width,$height);


So has anyone got a way of having to WYSIWYG fileds, i.e. FCKModules on the same page?

Thanks
« Last Edit: November 30, 2009, 04:33:26 PM by phillbooth » Logged
Luisehahne
Board Member
Development Team
*****
Offline Offline

Posts: 3146



WWW
« Reply #1 on: November 30, 2009, 06:00:16 PM »

May be that you search this or something else you can find on this url

http://www.websitebakers.com/pages/admin/admin-tools/frontedit.php

Dietmar
Logged

We are human beings - and nobody is perfect at all.
pcwacht
AddOn Development
*
Offline Offline

Posts: 2859



WWW
« Reply #2 on: November 30, 2009, 06:19:03 PM »

Make sure the textarea id's are different and call them ok !

PS Take a look at the source from the newsitem edit page, there are two wysiwyg's.
Maybe allso take a look at the source file /modules/news/modify_post.php

Have fun!
John
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!