<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Les forums de JeBulle.net – [JAVASCRIPT] Mettre en texte en gras dans un textarea]]></title>
	<link rel="self" href="https://forums.jebulle.net/feed/atom/topic/244/" />
	<updated>2003-06-13T05:34:25Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.jebulle.net/topic/244/javascript-mettre-en-texte-en-gras-dans-un-textarea/</id>
		<entry>
			<title type="html"><![CDATA[Re: [JAVASCRIPT] Mettre en texte en gras dans un textarea]]></title>
			<link rel="alternate" href="https://forums.jebulle.net/post/2660/#p2660" />
			<content type="html"><![CDATA[<p>mais si mais si !</p><br /><br /><p>Ca prend md2 de rajouter ca !</p><br /><br /><p>Si je trouve d&#039;autre pitit truc comme ca je le posterai ... ca avancera plus vite comme ca !&nbsp; ;-)</p>]]></content>
			<author>
				<name><![CDATA[Cyberbob002]]></name>
				<uri>https://forums.jebulle.net/user/5/</uri>
			</author>
			<updated>2003-06-13T05:34:25Z</updated>
			<id>https://forums.jebulle.net/post/2660/#p2660</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [JAVASCRIPT] Mettre en texte en gras dans un textarea]]></title>
			<link rel="alternate" href="https://forums.jebulle.net/post/2657/#p2657" />
			<content type="html"><![CDATA[<p>ok. C&#039;est effectivement un élément de la prochaine évolution de Bubulles News...si evolution il y aura :-D</p>]]></content>
			<author>
				<name><![CDATA[SamRay1024]]></name>
				<uri>https://forums.jebulle.net/user/2/</uri>
			</author>
			<updated>2003-06-12T16:21:23Z</updated>
			<id>https://forums.jebulle.net/post/2657/#p2657</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [JAVASCRIPT] Mettre en texte en gras dans un textarea]]></title>
			<link rel="alternate" href="https://forums.jebulle.net/post/2654/#p2654" />
			<content type="html"><![CDATA[<p>en fait lorsque tu clique sur &quot;gras&quot; ca vient mettre le code a l&#039;endroit ou se trouve la souris.</p><br /><br /><p>Si un texte était sélectionné alors ca met la balise ouvrante avant et la fermante apres (pas bete ca !!)</p><br /><br /><p>Exactement comme lorsque l&#039;on post sur le forum !</p><br /><br /><p>Ce qui est bien c&#039;est que l&#039;on peut mettre n&#039;importe kel code derriere le lien ! puisque c&#039;est une fonction qui recoit une chaine de caractere (le code)</p>]]></content>
			<author>
				<name><![CDATA[Cyberbob002]]></name>
				<uri>https://forums.jebulle.net/user/5/</uri>
			</author>
			<updated>2003-06-12T16:07:12Z</updated>
			<id>https://forums.jebulle.net/post/2654/#p2654</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [JAVASCRIPT] Mettre en texte en gras dans un textarea]]></title>
			<link rel="alternate" href="https://forums.jebulle.net/post/2651/#p2651" />
			<content type="html"><![CDATA[<p>c&#039;est un truc qui permet de faire de la mise en page dans un textarea c&#039;est bien ca ? en l&#039;occurence mettre une partie du texte en gras dans la zone ici.</p>]]></content>
			<author>
				<name><![CDATA[SamRay1024]]></name>
				<uri>https://forums.jebulle.net/user/2/</uri>
			</author>
			<updated>2003-06-12T15:56:05Z</updated>
			<id>https://forums.jebulle.net/post/2651/#p2651</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[[JAVASCRIPT] Mettre en texte en gras dans un textarea]]></title>
			<link rel="alternate" href="https://forums.jebulle.net/post/2650/#p2650" />
			<content type="html"><![CDATA[<p>J&amp;#39;ai trouvé se code et je le trouve tres simple et bien &amp;#33;&amp;#33; Ca fonctionne comme celui du forum.</p><p>Je post car il se peut que d&amp;#39;autre en ai besoin (ex : bubulles news&nbsp; ;-) )</p><p>&lt;!--html--&gt;&lt;/div&gt;&lt;table border=&#039;0&#039; align=&#039;center&#039; width=&#039;95%&#039; cellpadding=&#039;3&#039; cellspacing=&#039;1&#039;&gt;&lt;tr&gt;&lt;td&gt;<strong>HTML</strong> &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td id=&#039;CODE&#039;&gt;&lt;!--html1--&gt;&lt;<span style="color: blue">html</span>&gt;<br />&nbsp; &nbsp;&lt;<span style="color: blue">head</span>&gt;<br />&nbsp; &nbsp; &nbsp; &lt;<span style="color: blue">title</span>&gt;Votre Titre&lt;<span style="color: blue">/title</span>&gt;<br />&nbsp; &nbsp;&lt;<span style="color: blue">/head</span>&gt;</p><p>&nbsp; &nbsp;&lt;<span style="color: blue">body</span>&gt;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &amp;#60;script language=&quot;<span style="color: orange">JavaScript</span>&quot; type=&quot;<span style="color: orange">text/javascript</span>&quot;&gt;<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; function storeCaret&amp;#40;text&amp;#41; { <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// voided<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; function AddText&amp;#40;startTag,defaultText,endTag&amp;#41; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if &amp;#40;document.leform.message.createTextRange&amp;#41; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var text;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.leform.message.focus&amp;#40;document.leform.message.caretPos&amp;#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.leform.message.caretPos = document.selection.createRange&amp;#40;&amp;#41;.duplicate&amp;#40;&amp;#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&amp;#40;document.leform.message.caretPos.text.length&gt;0&amp;#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.leform.message.caretPos.text = startTag + document.leform.message.caretPos.text + endTag;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.leform.message.caretPos.text = startTag+defaultText+endTag;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else document.leform.message.value += startTag+defaultText+endTag;<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &lt;<span style="color: blue">/script</span>&gt;</p><p>&nbsp; &nbsp; &nbsp; &lt;<span style="color: blue">form method</span>=&quot;<span style="color: orange">post</span>&quot; name=&quot;<span style="color: orange">leform</span>&quot; action=&quot;<span style="color: orange">votre_lien.php</span>&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;<span style="color: blue">textarea name</span>=&quot;<span style="color: orange">message</span>&quot; cols=&quot;<span style="color: orange">50</span>&quot; rows=&quot;<span style="color: orange">8</span>&quot; wrap=&quot;<span style="color: orange">virtual</span>&quot; onmouseover=&quot;<span style="color: orange">this.focus&amp;#40;&amp;#41;;</span>&quot; onkeyup=&quot;<span style="color: orange">javascript&amp;#58;storeCaret&amp;#40;this&amp;#41;;</span>&quot; onclick=&quot;<span style="color: orange">javascript&amp;#58;storeCaret&amp;#40;this&amp;#41;;</span>&quot; onchange=&quot;<span style="color: orange">javascript&amp;#58;storeCaret&amp;#40;this&amp;#41;;</span>&quot;&gt;&lt;<span style="color: blue">/textarea</span>&gt;&lt;<span style="color: blue">br</span>&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;<span style="color: blue">a href</span>=&quot;<span style="color: orange">javascript&amp;#58;AddText&amp;#40;&amp;#39;&lt;&lt;span style=&#039;color:blue&#039;&gt;b</span>&gt;&amp;#39;,&amp;#39;Texte en gras&amp;#39;,&amp;#39;&lt;<span style="color: blue">/b</span>&gt;&amp;#39;&amp;#41;;&lt;/span&gt;&quot;&gt;Gras&lt;<span style="color: blue">/a</span>&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &lt;<span style="color: blue">a href</span>=&quot;<span style="color: orange">javascript&amp;#58;AddText&amp;#40;&amp;#39;&lt;&lt;span style=&#039;color:blue&#039;&gt;i</span>&gt;&amp;#39;,&amp;#39;Texte en italique&amp;#39;,&amp;#39;&lt;<span style="color: blue">/i</span>&gt;&amp;#39;&amp;#41;;&lt;/span&gt;&quot;&gt;Italique&lt;<span style="color: blue">/a</span>&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &lt;<span style="color: blue">a href</span>=&quot;<span style="color: orange">javascript&amp;#58;AddText&amp;#40;&amp;#39;&lt;&lt;span style=&#039;color:blue&#039;&gt;u</span>&gt;&amp;#39;,&amp;#39;Texte souligné&amp;#39;,&amp;#39;&lt;<span style="color: blue">/u</span>&gt;&amp;#39;&amp;#41;;&lt;/span&gt;&quot;&gt;Souligné&lt;<span style="color: blue">/a</span>&gt;<br />&nbsp; &nbsp; &nbsp; &lt;<span style="color: blue">/form</span>&gt;<br />&nbsp; &nbsp;&lt;<span style="color: blue">/body</span>&gt;<br />&lt;<span style="color: blue">/html</span>&gt;&lt;!--html2--&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class=&#039;postcolor&#039;&gt;&lt;!--html3--&gt;</p><p>Et voila &amp;#33;&amp;#33; Sympa non ?</p><p>Ah oui, j&amp;#39;oubliais : 3 choses importantes :<br />- le formulaire s&amp;#39;appelle <strong>leform</strong><br />- le textarea <strong>message</strong><br />- et c&amp;#39;est tout en fait ...&nbsp; <img src="https://forums.jebulle.net/img/smilies/lol.png" width="15" height="15" alt="lol" /></p>]]></content>
			<author>
				<name><![CDATA[Cyberbob002]]></name>
				<uri>https://forums.jebulle.net/user/5/</uri>
			</author>
			<updated>2003-06-12T15:43:16Z</updated>
			<id>https://forums.jebulle.net/post/2650/#p2650</id>
		</entry>
</feed>
