pmusa ▓▓▓▓▓▓▓ | yo Bon, je préviens, c'est assez "lourd" comme code, "voudra bien m'aider qui voudra" Alors voilà:
je code un petit module de messagerie locale pour un projet avec un poto. j'ai pompé du js par-ci par-là (c'est un domaine ou j'excèle pas franchement ), et pour l'insertion des tags, ça donne ça:
Code :
- <style>
- .smiley a{
- cursor: default;
- }
- .bbcode { border : 0px none #000000; margin: 0; vertical-align : bottom; }
- </style>
- <script type="text/javascript">
- function insereTag(Tag, fTag)
- {
- ajtBBCode(Tag, fTag, "message" );
- }
- function insereTxt(txt)
- {
- ajtTexte(txt, "message" );
- }
- function ajtTexte(txt,id)
- {
- var obj = document.getElementById(id), sel;
- obj.focus();
- if(document.selection && document.selection.createRange){
- sel = document.selection.createRange();
- if (sel.parentElement()==obj)//si sel est dans obj
- sel.text = sel.text+txt;
- }
- else if(String(typeof obj.selectionStart)!="undefined" ){
- sel = obj.selectionStart;
- obj.value = (obj.value).substring(0,sel) +
- txt +
- (obj.value).substring(sel,obj.value.length);
- }
- else obj.value+=txt;
- obj.focus();
- }
- function ajtBBCode(Tag, fTag, id)
- {
- var obj = document.getElementById(id), sel;
- obj.focus();
- if (document.selection && document.selection.createRange){//if ie
- sel = document.selection.createRange();
- if (sel.parentElement()==obj)//si sel est dans obj
- sel.text = Tag+sel.text+fTag;
- }
- else if(String(typeof obj.selectionStart)!="undefined" ){
- var longueur= parseInt(obj.textLength);
- var selStart = obj.selectionStart;
- var selEnd = obj.selectionEnd;
- if (selEnd == 2 || selEnd == 1)selEnd = longueur;
- obj.value = (obj.value).substring(0,selStart) +
- Tag +
- (obj.value).substring(selStart,selEnd) +
- fTag +
- (obj.value).substring(selEnd,longueur);
- }
- else obj.value+=Tag+fTag;
- obj.focus();
- }
- </script>
- <script language="Javascript" type="text/javascript">
- // args : string moncontroletexte, int nbcar, string moncontroledecompte
- // return : aucun
- // Affecte à certains évènements d'un textarea, le contrôle de la longueur de son contenu
- function LimiterTextArea(nom_controletexte, nbcar, nom_controledecompte)
- {
- var moncontroletexte = document.getElementById(nom_controletexte);
-
- var moncontroledecompte = document.getElementById(nom_controledecompte);
-
- if (moncontroletexte && moncontroledecompte)
- {
-
- moncontroletexte.onclick = function(){TextAreaEstRempli(moncontroletexte, nbcar, moncontroledecompte)};
- moncontroletexte.onblur = function(){TextAreaEstRempli(moncontroletexte, nbcar, moncontroledecompte)};
- moncontroletexte.onkeyup = function(){TextAreaEstRempli(moncontroletexte, nbcar, moncontroledecompte)};
- moncontroletexte.onkeypress = function(){TextAreaEstRempli(moncontroletexte, nbcar, moncontroledecompte)};
-
- // *** Affichage du nombre de caractères restant
- if(moncontroledecompte.type)
- moncontroledecompte.value = NbCarRestant(moncontroletexte, nbcar); // Pour un input de formulaire
- else
- moncontroledecompte.innerHTML = NbCarRestant(moncontroletexte, nbcar); // Pour un élément HTML
-
- }
- }
-
- // TextAreaEstRempli
- // args : textarea moncontroletexte, int nbcar, element_HTML moncontroledecompte
- // return : bool
- // Renvoie vrai si le nombre de caractères maximum du textarea n'est pas atteint
- function TextAreaEstRempli(moncontroletexte, nbcar, moncontroledecompte)
- {
- if (moncontroletexte)
- {
- if (moncontroletexte.value.length <= nbcar)
- {
- //alert("pas rempli" );
- // mes actions ...
-
- // *** Affichage du nombre de caractères restant
- if(moncontroledecompte.type)
- moncontroledecompte.value = NbCarRestant(moncontroletexte, nbcar);
- else
- moncontroledecompte.innerHTML = NbCarRestant(moncontroletexte, nbcar);
-
- return true;
- }
- else
- {
- //alert("rempli" );
- // mes actions ...
-
- // Affichage du nombre de caractères restant
- moncontroletexte.value = moncontroletexte.value.substr(0, nbcar);
-
- // *** Affichage du nombre de caractères restant
- if(moncontroledecompte.type)
- moncontroledecompte.value = NbCarRestant(moncontroletexte, nbcar);
- else
- moncontroledecompte.innerHTML = NbCarRestant(moncontroletexte, nbcar);
-
- return false;
- }
- }
- }
-
- // NbCarRestant
- // args : textarea moncontroletexte, int nbcar
- // return : int
- // Renvoie le nombre de caractère à saisir
- function NbCarRestant(moncontroletexte, nbcar)
- {
- if (moncontroletexte.value.length)
- return new Number(nbcar - moncontroletexte.value.length);
- else
- return new Number(nbcar);
- }
- </script>
|
ainsi, quand on clique sur le bouton de l'image italique, ça inscrit [i][/i] dans le textarea. \o/ pareil pour le bold, underline, etc.
Là où ça se complique, c'est que j'essaye d'incruster un js pour permettre à l'utilisateur de selectionner une couleur pour son texte. donc dès qu'il clique sur un couleur, il doit y avoir [c=#cdcdcd]texte[/c]. à priori, avec le code que j'ai trouvé et traficotté ça marche mais quand on selectionne la couleur, le textarea est tout effacé (donc on perd tout ce qui été ecrit). ça donne ça (un extrait):
Code :
- </td>
- <td style="padding-bottom:0;">';?><br /><br />
- <a href="javascript:insereTag('','')" onMouseOver= "if (document.images) document.b.src='./img/bold2.bmp';" onMouseOut= "if (document.images) document.b.src='./img/bold.bmp';" style="text-decoration:none;"><img src="./img/bold.bmp" class="bbcode" name="b" width="25" height="22" alt="gras" title="gras" /></a><a href="javascript:insereTag('','')" onMouseOver= "if (document.images) document.i.src='./img/italic2.bmp';" onMouseOut= "if (document.images) document.i.src='./img/italic.bmp';" style="text-decoration:none;"><img src="./img/italic.bmp" class="bbcode" name="i" width="24" height="22" alt="italique" title="italique" /></a><a href="javascript:insereTag('','')" onMouseOver= "if (document.images) document.u.src='./img/u2.bmp';" onMouseOut= "if (document.images) document.u.src='./img/u.bmp';" style="text-decoration:none;"><img src="./img/u.bmp" class="bbcode" name="u" width="23" height="22" alt="souligné" title="souligné" /></a>
- <a href="javascript:insereTag('','')" onMouseOver= "if (document.images) document.g.src='./img/g2.bmp';" onMouseOut= "if (document.images) document.g.src='./img/g.bmp';" style="text-decoration:none;"><img src="./img/g.bmp" class="bbcode" name="g" width="25" height="22" alt="alignement gauche" title="alignement gauche" /></a><a href="javascript:insereTag('[c]','[/c]')" onMouseOver= "if (document.images) document.c.src='./img/c2.bmp';" onMouseOut= "if (document.images) document.c.src='./img/c.bmp';" style="text-decoration:none;"><img src="./img/c.bmp" class="bbcode" name="c" width="24" height="22" alt="[c]centré[/c]" title="[c]centré[/c]" /></a><a href="javascript:insereTag('[d]','[/d]')" onMouseOver= "if (document.images) document.d.src='./img/d2.bmp';" onMouseOut= "if (document.images) document.d.src='./img/d.bmp';" style="text-decoration:none;"><img src="./img/d.bmp" class="bbcode" name="d" width="26" height="22" alt="[d]alignement droit[/d]" title="[d]alignement droit[/d]" /
- </a>
- <a href="javascript:insereTag('','')" onMouseOver= "if (document.images) document.url.src='./img/url2.bmp';" onMouseOut= "if (document.images) document.url.src='./img/url.bmp';" style="text-decoration:none;"><img src="./img/url.bmp" class="bbcode" name="url" width="25" height="22" alt="insérer un lien" title="insérer un lien" /></a><a href="javascript:insereTag('[img]','[/img]')" onMouseOver= "if (document.images) document.img.src='./img/img2.bmp';" onMouseOut= "if (document.images) document.img.src='./img/img.bmp';" style="text-decoration:none;"><img src="./img/img.bmp" class="bbcode" name="img" width="23" height="22" alt="[img]insérer une image[/img]" title="[img]insérer une image[/img]" /></a>
- <a href="javascript:insereTag('[aa]','[/aa]')" onMouseOver= "if (document.images) document.aa.src='./img/aa2.bmp';" onMouseOut= "if (document.images) document.aa.src='./img/aa.bmp';" style="text-decoration:none;"><img src="./img/aa.bmp" class="bbcode" name="aa" width="28" height="22" alt="[aa]txt[/aa]" title="[aa]txt[/aa]" /></a><a href="javascript:insereTag('[Aaa]','[/Aaa]')" onMouseOver= "if (document.images) document.Aaa.src='./img/Aaa2.bmp';" onMouseOut= "if (document.images) document.Aaa.src='./img/Aaa.bmp';" style="text-decoration:none;"><img src="./img/Aaa.bmp" class="bbcode" name="Aaa" width="26" height="22" alt="[Aaa]txt[/Aaa]" title="[Aaa]txt[/Aaa]" /></a>
- <?php echo'</td>
- </tr>
- <tr>
- <td align="right" valign="top" >Message : </td>
- <td align="left" style="padding-top:0;"><textarea name="message" id="message" style="width:260px; height:120px;">';
- echo '</textarea><br />
|
et pour le script qui permet de selectionner une couleur de font, je dois faire ainsi:
Code :
- <HTML>
- <HEAD>
- <TITLE>JavaScript Toolbox - Color Picker Swatch Popup</TITLE>
- <SCRIPT LANGUAGE="Javascript" SRC="./ColorPicker2.js"></SCRIPT>
- <SCRIPT LANGUAGE="JavaScript">
- var cp = new ColorPicker('window'); // Popup window
- var cp2 = new ColorPicker(); // DIV style
- </SCRIPT>
- </HEAD>
- <FORM>
- Color: <INPUT TYPE="text" NAME="color2" SIZE="20" VALUE=""> <A HREF="#" onClick="cp2.select(document.forms[0].color2,'pick2');return false;" NAME="pick2" ID="pick2">Pick</A>
- </FORM>
- <SCRIPT LANGUAGE="JavaScript">cp.writeDiv()</SCRIPT>
- </BODY>
- </HTML>
|
avec le fichier inclus: ColorPicker2.js :
Code :
- // ===================================================================
- // Author: Matt Kruse <matt@mattkruse.com>
- // WWW: http://www.mattkruse.com/
- //
- // NOTICE: You may use this code for any purpose, commercial or
- // private, without any further permission from the author. You may
- // remove this notice from your final code if you wish, however it is
- // appreciated by the author if at least my web site address is kept.
- //
- // You may *NOT* re-distribute this code in any way except through its
- // use. That means, you can include it in your product, or your web
- // site, or any other form where the code is actually being used. You
- // may not put the plain javascript up on your site for download or
- // include it in your javascript libraries for download.
- // If you wish to share this code with others, please just point them
- // to the URL instead.
- // Please DO NOT link directly to my .js files from your site. Copy
- // the files to your server and use them there. Thank you.
- // ===================================================================
- /* SOURCE FILE: AnchorPosition.js */
- function getAnchorPosition(anchorname){var useWindow=false;var coordinates=new Object();var x=0,y=0;var use_gebi=false, use_css=false, use_layers=false;if(document.getElementById){use_gebi=true;}else if(document.all){use_css=true;}else if(document.layers){use_layers=true;}if(use_gebi && document.all){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);}else if(use_gebi){var o=document.getElementById(anchorname);x=AnchorPosition_getPageOffsetLeft(o);y=AnchorPosition_getPageOffsetTop(o);}else if(use_css){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);}else if(use_layers){var found=0;for(var i=0;i<document.anchors.length;i++){if(document.anchors[i].name==anchorname){found=1;break;}}if(found==0){coordinates.x=0;coordinates.y=0;return coordinates;}x=document.anchors[i].x;y=document.anchors[i].y;}else{coordinates.x=0;coordinates.y=0;return coordinates;}coordinates.x=x;coordinates.y=y;return coordinates;}
- function getAnchorWindowPosition(anchorname){var coordinates=getAnchorPosition(anchorname);var x=0;var y=0;if(document.getElementById){if(isNaN(window.screenX)){x=coordinates.x-document.body.scrollLeft+window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop;}else{x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;}}else if(document.all){x=coordinates.x-document.body.scrollLeft+window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop;}else if(document.layers){x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;}coordinates.x=x;coordinates.y=y;return coordinates;}
- function AnchorPosition_getPageOffsetLeft(el){var ol=el.offsetLeft;while((el=el.offsetParent) != null){ol += el.offsetLeft;}return ol;}
- function AnchorPosition_getWindowOffsetLeft(el){return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;}
- function AnchorPosition_getPageOffsetTop(el){var ot=el.offsetTop;while((el=el.offsetParent) != null){ot += el.offsetTop;}return ot;}
- function AnchorPosition_getWindowOffsetTop(el){return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;}
- /* SOURCE FILE: PopupWindow.js */
- function PopupWindow_getXYPosition(anchorname){var coordinates;if(this.type == "WINDOW" ){coordinates = getAnchorWindowPosition(anchorname);}else{coordinates = getAnchorPosition(anchorname);}this.x = coordinates.x;this.y = coordinates.y;}
- function PopupWindow_setSize(width,height){this.width = width;this.height = height;}
- function PopupWindow_populate(contents){this.contents = contents;this.populated = false;}
- function PopupWindow_setUrl(url){this.url = url;}
- function PopupWindow_setWindowProperties(props){this.windowProperties = props;}
- function PopupWindow_refresh(){if(this.divName != null){if(this.use_gebi){document.getElementById(this.divName).innerHTML = this.contents;}else if(this.use_css){document.all[this.divName].innerHTML = this.contents;}else if(this.use_layers){var d = document.layers[this.divName];d.document.open();d.document.writeln(this.contents);d.document.close();}}else{if(this.popupWindow != null && !this.popupWindow.closed){if(this.url!="" ){this.popupWindow.location.href=this.url;}else{this.popupWindow.document.open();this.popupWindow.document.writeln(this.contents);this.popupWindow.document.close();}this.popupWindow.focus();}}}
- function PopupWindow_showPopup(anchorname){this.getXYPosition(anchorname);this.x += this.offsetX;this.y += this.offsetY;if(!this.populated &&(this.contents != "" )){this.populated = true;this.refresh();}if(this.divName != null){if(this.use_gebi){document.getElementById(this.divName).style.left = this.x + "px";document.getElementById(this.divName).style.top = this.y;document.getElementById(this.divName).style.visibility = "visible";}else if(this.use_css){document.all[this.divName].style.left = this.x;document.all[this.divName].style.top = this.y;document.all[this.divName].style.visibility = "visible";}else if(this.use_layers){document.layers[this.divName].left = this.x;document.layers[this.divName].top = this.y;document.layers[this.divName].visibility = "visible";}}else{if(this.popupWindow == null || this.popupWindow.closed){if(this.x<0){this.x=0;}if(this.y<0){this.y=0;}if(screen && screen.availHeight){if((this.y + this.height) > screen.availHeight){this.y = screen.availHeight - this.height;}}if(screen && screen.availWidth){if((this.x + this.width) > screen.availWidth){this.x = screen.availWidth - this.width;}}var avoidAboutBlank = window.opera ||( document.layers && !navigator.mimeTypes['*']) || navigator.vendor == 'KDE' ||( document.childNodes && !document.all && !navigator.taintEnabled);this.popupWindow = window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"" );}this.refresh();}}
- function PopupWindow_hidePopup(){if(this.divName != null){if(this.use_gebi){document.getElementById(this.divName).style.visibility = "hidden";}else if(this.use_css){document.all[this.divName].style.visibility = "hidden";}else if(this.use_layers){document.layers[this.divName].visibility = "hidden";}}else{if(this.popupWindow && !this.popupWindow.closed){this.popupWindow.close();this.popupWindow = null;}}}
- function PopupWindow_isClicked(e){if(this.divName != null){if(this.use_layers){var clickX = e.pageX;var clickY = e.pageY;var t = document.layers[this.divName];if((clickX > t.left) &&(clickX < t.left+t.clip.width) &&(clickY > t.top) &&(clickY < t.top+t.clip.height)){return true;}else{return false;}}else if(document.all){var t = window.event.srcElement;while(t.parentElement != null){if(t.id==this.divName){return true;}t = t.parentElement;}return false;}else if(this.use_gebi && e){var t = e.originalTarget;while(t.parentNode != null){if(t.id==this.divName){return true;}t = t.parentNode;}return false;}return false;}return false;}
- function PopupWindow_hideIfNotClicked(e){if(this.autoHideEnabled && !this.isClicked(e)){this.hidePopup();}}
- function PopupWindow_autoHide(){this.autoHideEnabled = true;}
- function PopupWindow_hidePopupWindows(e){for(var i=0;i<popupWindowObjects.length;i++){if(popupWindowObjects[i] != null){var p = popupWindowObjects[i];p.hideIfNotClicked(e);}}}
- function PopupWindow_attachListener(){if(document.layers){document.captureEvents(Event.MOUSEUP);}window.popupWindowOldEventListener = document.onmouseup;if(window.popupWindowOldEventListener != null){document.onmouseup = new Function("window.popupWindowOldEventListener();PopupWindow_hidePopupWindows();" );}else{document.onmouseup = PopupWindow_hidePopupWindows;}}
- function PopupWindow(){if(!window.popupWindowIndex){window.popupWindowIndex = 0;}if(!window.popupWindowObjects){window.popupWindowObjects = new Array();}if(!window.listenerAttached){window.listenerAttached = true;PopupWindow_attachListener();}this.index = popupWindowIndex++;popupWindowObjects[this.index] = this;this.divName = null;this.popupWindow = null;this.width=0;this.height=0;this.populated = false;this.visible = false;this.autoHideEnabled = false;this.contents = "";this.url="";this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";if(arguments.length>0){this.type="DIV";this.divName = arguments[0];}else{this.type="WINDOW";}this.use_gebi = false;this.use_css = false;this.use_layers = false;if(document.getElementById){this.use_gebi = true;}else if(document.all){this.use_css = true;}else if(document.layers){this.use_layers = true;}else{this.type = "WINDOW";}this.offsetX = 0;this.offsetY = 0;this.getXYPosition = PopupWindow_getXYPosition;this.populate = PopupWindow_populate;this.setUrl = PopupWindow_setUrl;this.setWindowProperties = PopupWindow_setWindowProperties;this.refresh = PopupWindow_refresh;this.showPopup = PopupWindow_showPopup;this.hidePopup = PopupWindow_hidePopup;this.setSize = PopupWindow_setSize;this.isClicked = PopupWindow_isClicked;this.autoHide = PopupWindow_autoHide;this.hideIfNotClicked = PopupWindow_hideIfNotClicked;}
- /* SOURCE FILE: ColorPicker2.js */
- ColorPicker_targetInput = null;
- function ColorPicker_writeDiv(){document.writeln("<DIV ID=\"colorPickerDiv\" STYLE=\"position:absolute;visibility:hidden;\"> </DIV>" );}
- function ColorPicker_show(anchorname){this.showPopup(anchorname);}
- function ColorPicker_pickColor(color,obj){obj.hidePopup();pickColor(color);}
- function pickColor(color){if(ColorPicker_targetInput==null){alert("Target Input is null, which means you either didn't use the 'select' function or you have no defined your own 'pickColor' function to handle the picked color!" );return;}ColorPicker_targetInput.value = color;}
- function ColorPicker_select(inputobj,linkname){if(inputobj.type!="text" && inputobj.type!="hidden" && inputobj.type!="textarea" ){alert("colorpicker.select: Input object passed is not a valid form input object" );window.ColorPicker_targetInput=null;return;}window.ColorPicker_targetInput = inputobj;this.show(linkname);}
- function ColorPicker_highlightColor(c){var thedoc =(arguments.length>1)?arguments[1]:window.document;var d = thedoc.getElementById("colorPickerSelectedColor" );d.style.backgroundColor = c;d = thedoc.getElementById("colorPickerSelectedColorValue" );d.innerHTML = c;}
- function ColorPicker(){var windowMode = false;if(arguments.length==0){var divname = "colorPickerDiv";}else if(arguments[0] == "window" ){var divname = '';windowMode = true;}else{var divname = arguments[0];}if(divname != "" ){var cp = new PopupWindow(divname);}else{var cp = new PopupWindow();cp.setSize(225,250);}cp.currentValue = "#FFFFFF";cp.writeDiv = ColorPicker_writeDiv;cp.highlightColor = ColorPicker_highlightColor;cp.show = ColorPicker_show;cp.select = ColorPicker_select;var colors = new Array("#000000",
- "#993300","#333300","#003300","#003366","#000080","#333399","#333333",
- "#800000","#FF6600","#808000","#808080","#008080","#0000FF","#666699","#808080",
- "#FF0000","#FF9900","#99CC00","#339966","#33CCCC","#3366FF","#800080","#999999",
- "#FF00FF","#FFCC00","#FFFF00","#00FF00","#00FFFF","#00CCFF","#993366","#C0C0C0",
- "#FF99CC","#FFCC99","#FFFF99","#CCFFCC","#CCFFFF","#99CCFF","#CC99FF","#FFFFFF" );
- var total = colors.length;var width = 8;var cp_contents = "";var windowRef =(windowMode)?"window.opener.":"";if(windowMode){cp_contents += "<HTML><HEAD><TITLE>Select Color</TITLE></HEAD>";cp_contents += "<BODY MARGINWIDTH=0 MARGINHEIGHT=0 LEFTMARGIN=0 TOPMARGIN=0><CENTER>";}cp_contents += "<table style='border: 1px dashed #bebebe;' cellspacing=1 cellpadding=0>";var use_highlight =(document.getElementById || document.all)?true:false;for(var i=0;i<total;i++){if((i % width) == 0){cp_contents += "<TR>";}if(use_highlight){var mo = 'onMouseOver="'+windowRef+'ColorPicker_highlightColor(\''+colors[i]+'\',window.document)"';}else{mo = "";}cp_contents += '<TD BGCOLOR="'+colors[i]+'"><FONT SIZE="-3"><A HREF="#" onClick="'+windowRef+'ColorPicker_pickColor(\'[c='+colors[i]+']texte[/c]\','+windowRef+'window.popupWindowObjects['+cp.index+']);return false;" '+mo+' STYLE="text-decoration:none;"> </A></FONT></TD>';if( ((i+1)>=total) ||(((i+1) % width) == 0)){cp_contents += "</TR>";}}
- if(document.getElementById){var width1 = Math.floor(width/2);var width2 = width = width1;cp_contents += "<TR><TD COLSPAN='"+(width1-1)+"' BGCOLOR='#000000' ID='colorPickerSelectedColor'> </TD><TD COLSPAN='"+(width2+1)+"' ALIGN='CENTER' ID='colorPickerSelectedColorValue' style='font-family:Arial; font-size:9px; border-top:1px dashed #cdcdcd; border-left:1px dashed #cdcdcd;'>#000000</TD></TR>";}cp_contents += "</TABLE>";if(windowMode){cp_contents += "</CENTER></BODY></HTML>";}cp.populate(cp_contents+"\n" );cp.offsetY = 25;cp.autoHide();return cp;}
|
Voilà, en fait je cherche à adapter ce script de colorpicker avec le script de bbcode que j'ai déjà. énorme merci à celui qui a le courage de bien vouloir s'interesser à mon cas. Message édité par pmusa le 21-11-2006 à 20:47:01 ---------------
intralase surgery [:cerveau love]
|