הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   התחלתי לכתוב ואין לי כח אם מישהו רוצה לפתח ( WYSIWYG ) (https://hosts.co.il/forums/showthread.php?t=21348)

hi_sorie 06-05-06 21:35

התחלתי לכתוב ואין לי כח אם מישהו רוצה לפתח ( WYSIWYG )
 
הנה איך שזה נראה עד עכשיו ...

http://sorya.seoz.net/logs/site/wys/

אני עייף ...

אז הנה הקוד ...

PHP קוד:

<html dir="rtl">
 
<head>
<SCRIPT language=JavaScript>
function add_simle(smaili)
{
xxx = smaili;
switch (xxx)
{
case 1:
 
textura_value = form.x.value + " :p";
break;
case 2:
 
textura_value = form.x.value + " :boom:";
break;
default:
 
textura_value = form.x.value + " :o";
}
form.x.value = textura_value;
form.x.focus();
}
function add_style(style)
{
xxx = style;
switch (xxx)
{
case 1:
 
textura_value = form.x.value + "<b></b>";
break;
default:
 
textura_value = form.x.value + "<i></i>";
}
form.x.value = textura_value;
form.x.focus();
}
</SCRIPT> 
</head>
<body>
 
<?
if ($_POST['x'])
{
echo 
"<p>-----------------------------------------</p>";
$textura_value=$_POST['x'];
$textura_value str_replace ':p''<img src="images/smile.jpg" />' $textura_value );
$textura_value str_replace ':o''<img src="images/sad.jpg" />' $textura_value ); 
$textura_value str_replace ':boom:''<img src="images/boom.jpg" />' $textura_value ); 
echo 
nl2br($textura_value);
echo 
"<br /><p>-----------------------------------------</p><br />";
}
?>
<form name="form" action="<?=$PHP_SELF ?>" method="post">
<table>
<tr>
<td colspan="2">
<img src="images/bold.gif" border="0" onClick="add_style(1);" />
<img src="images/italic.gif" border="0" onClick="add_style();" />
</td>
</tr>
<tr>
<td>
<img src="images/smile.jpg" border="0" onClick="add_simle(1);" />
<img src="images/boom.jpg" border="0" onClick="add_simle(2);" />
<img src="images/sad.jpg" border="0" onClick="add_simle();" /> 
</td>
<td>
<TEXTAREA rows="10" cols="100" name="x" style="text-align:right;"></TEXTAREA>
</td>
</tr>
<tr>
<td colspan="2">
<INPUT type="submit" name="submit1" value="שלח">
</td>
</tr>
</table>
</form>
</body>
</html>

מי שיש לו כח פה להמשיך מוזמן .....
ד"א הנה הקוד להורדה : http://sorya.seoz.net/logs/site/wys/down.rar

תהנו ...

יונתן 06-05-06 21:37

זה לא עורך wysiwyg

hi_sorie 06-05-06 21:40

ציטוט:

נכתב במקור על ידי יונתן
זה לא עורך wysiwyg

טעות שלי ..

תקרא לזה איך שתקרא ...

אם מישהו רוצה לפתח את זה... שיהנה ...
ד"א זה טוב למערכת תגובות...


כל הזמנים הם GMT +2. הזמן כעת הוא 22:10.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ