Nieuw lid |
|
Tuurlijk kan dat.
Dit is de pagina waar ik de wysiwyg gebruik.
Ik ben achter dat ik hier: window.frames['wysiwyg']
mee moet beginnen dat werkt ook.
Maar de code heeft nog meer nodig om het juiste veld te pakken.
<?php
$form_obj->form("javascript:void(0);", "post","comment","","","","comments('".HTTP_SERVER."');");
$form_obj->input("hidden","module_name","".$Module_name."");
$form_obj->input("hidden","user_name","".$User_name."");
$form_obj->input("hidden","user_id","".$User_id."");
echo "<br/>";
echo T_MOD_PROFILE_26;
$form_obj->input("text","onderwerp","");
echo "<br/>";
$form_obj->textarea("bericht","","45","5");
echo "<br/>";
echo T_MOD_PROFILE_27;
$form_obj->input("checkbox","privat","1");
echo "<br/>";
$form_obj->input("submit","comment","".T_MOD_PROFILE_28."","","","","","");
$form_obj->formend();
?>
<?php $form_obj->form("javascript:void(0);", "post","comment","","","","comments('".HTTP_SERVER."');"); $form_obj->input("hidden","module_name","".$Module_name.""); $form_obj->input("hidden","user_name","".$User_name.""); $form_obj->input("hidden","user_id","".$User_id.""); $form_obj->input("text","onderwerp",""); $form_obj->textarea("bericht","","45","5"); $form_obj->input("checkbox","privat","1"); $form_obj->input("submit","comment","".T_MOD_PROFILE_28."","","","","",""); $form_obj->formend(); ?>
wysiwyg begin class
var wysiwyg = new Class({
initialize: function(params){
this.TA = params.textarea || document.getElement('textarea');
this.TB = new Element('div',{'class':'toolbar'});
this.IF = new Element('iframe',{'frameborder':0,'src':(params.src||'about:blank')}).addEvent('load',function(){
this.doc = this.IF.contentWindow.document;
this.doc.designMode = 'on';
this.toggleView();
}.bind(this));
this.CT = new Element('div',{'class':(params.klass||'wysiwyg')}).injectBefore(this.TA).adopt(this.TB,this.IF,this.TA);
this.open = false;
$each((params.buttons||['strong','em','u','superscript','subscript',null,'left','center','right','indent','outdent',null,'h1','h2','h3','p','ul','ol',null,'img','link','unlink',null,'clean','toggle']),function(b){
if(!b){
new Element('span',{'class':'spacer'}).inject(this.TB);
}else if(Browser.Engine.trident){
new Element('a',{'class':b,'href':'//'+b}).addEvent('click',function(e){
var ev = new Event(e); ev.stop();
if(b=='toggle'){
this.toggleView();
}else{
this.exec(b);
}
}.bind(this)).inject(this.TB);
}else{
new Element('span',{'class':b}).addEvent('click',(b=='toggle'?this.toggleView.bind(this):this.exec.bind(this,[b]))).inject(this.TB);
}
},this);
},
var wysiwyg = new Class({ initialize: function(params){ this.TA = params.textarea || document.getElement('textarea'); this.TB = new Element('div',{'class':'toolbar'}); this.IF = new Element('iframe',{'frameborder':0,'src':(params.src||'about:blank')}).addEvent('load',function(){ this.doc = this.IF.contentWindow.document; this.doc.designMode = 'on'; this.toggleView(); }.bind(this)); this.CT = new Element('div',{'class':(params.klass||'wysiwyg')}).injectBefore(this.TA).adopt(this.TB,this.IF,this.TA); this.open = false; $each((params.buttons||['strong','em','u','superscript','subscript',null,'left','center','right','indent','outdent',null,'h1','h2','h3','p','ul','ol',null,'img','link','unlink',null,'clean','toggle']),function(b){ if(!b){ new Element('span',{'class':'spacer'}).inject(this.TB); }else if(Browser.Engine.trident){ new Element('a',{'class':b,'href':'//'+b}).addEvent('click',function(e){ var ev = new Event(e); ev.stop(); if(b=='toggle'){ this.toggleView(); }else{ } }.bind(this)).inject(this.TB); }else{ new Element ('span',{'class':b }).addEvent ('click',(b =='toggle'?this .toggleView .bind (this ):this .exec.bind (this ,[b ]))).inject (this .TB ); } },this); },
|