<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>&#60;Angered Brackets /&#62; &#187; Firefox</title>
	<atom:link href="http://www.angeredbrackets.com/tag/firefox/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.angeredbrackets.com</link>
	<description>Angle brackets get angry too! &#62;:-]</description>
	<lastBuildDate>Tue, 01 Dec 2009 00:40:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>‫החדרת תגי תמיכה בדו-כיווניות (BiDi) בשדות טקסט‬</title>
		<link>http://www.angeredbrackets.com/2009/06/%e2%80%ab%d7%94%d7%97%d7%93%d7%a8%d7%aa-%d7%aa%d7%92%d7%99-%d7%aa%d7%9e%d7%99%d7%9b%d7%94-%d7%91%d7%93%d7%95-%d7%9b%d7%99%d7%95%d7%95%d7%a0%d7%99%d7%95%d7%aa-bidi-%d7%91%d7%a9%d7%93%d7%95%d7%aa/</link>
		<comments>http://www.angeredbrackets.com/2009/06/%e2%80%ab%d7%94%d7%97%d7%93%d7%a8%d7%aa-%d7%aa%d7%92%d7%99-%d7%aa%d7%9e%d7%99%d7%9b%d7%94-%d7%91%d7%93%d7%95-%d7%9b%d7%99%d7%95%d7%95%d7%a0%d7%99%d7%95%d7%aa-bidi-%d7%91%d7%a9%d7%93%d7%95%d7%aa/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 14:38:25 +0000</pubDate>
		<dc:creator>Ethan</dc:creator>
				<category><![CDATA[weekend project]]></category>
		<category><![CDATA[BiDi]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[hebrew]]></category>

		<guid isPermaLink="false">http://www.angeredbrackets.com/?p=84</guid>
		<description><![CDATA[הקדמה: פוסט זה הוא תגובה לפוסט של לירון נוימן בנושא הנ&#8221;ל. לירון שואל &#8220;מכירים את זה שאתם כותבים בעברית באתר בינלאומי כלשהו שלא תומך בכיווניות טקסט (למשל פייסבוק), ואז, לא רק שסימני הפיסוק שלכם יוצאים בצד הלא נכון, אלא גם שאם עירבתם גם אנגלית בטקסט, כל הסדר שלו מתחרבש?&#8221; הוא מסיים את הפוסט שלו ושואל [...]]]></description>
			<content:encoded><![CDATA[<div style="direction:rtl; text-align:right;">
<p>הקדמה: פוסט זה הוא תגובה ל<a href="http://eesh.net/blog/?p=234">פוסט של לירון נוימן</a> בנושא הנ&#8221;ל. לירון שואל &#8220;מכירים את זה שאתם כותבים בעברית באתר בינלאומי כלשהו שלא תומך בכיווניות טקסט (למשל פייסבוק), ואז, לא רק שסימני הפיסוק שלכם יוצאים בצד הלא נכון, אלא גם שאם עירבתם גם אנגלית בטקסט, כל הסדר שלו מתחרבש?&#8221; הוא מסיים את הפוסט שלו ושואל &#8220;מי מתנדב להרים את הכפפה ולבנות איזה תוסף לשועל שיאפשר להוסיף את התווים האלה איפה שצריך&#8230;?&#8221;<br />
ובכן, התשובה שלי היא &#8216;טוב, נו, אני אעשה את זה&#8230;&#8217;</p>
<p>הקדמה 2: פוסט זה הוא תרגום לעברית של ה<a href="http://www.angeredbrackets.com/2009/06/inserting-bidi-support-tags-in-online-textareas/">פוסט הקודם שלי</a>, למקרה ואתם רוצים לקרוא את זה באנגלית או לחלוק עם אנשים בניכר.</p>
<p>הנה דוגמא לבעיה המתוארת:</p>
<input style="direction: ltr; width: 200px;" type="text" value="יש בעיה עם הכיוון של ה-text הזה" />
<p>ובכן, הפתרון (הנכון) לבעיה הזו היא כזו: יש לעטוף את הטקסט שאנחנו רוצים לשנות את הכיווניות שלו בתווי היוניקוד המציינים הטמעת כיווניות <a href="http://www.fileformat.info/info/unicode/char/202b/index.htm">ימין לשמאל</a> (או לחילופין <a href="http://www.fileformat.info/info/unicode/char/202a/index.htm">שמאל לימין</a>) בתחילת המחרוזת, ותו היוניקוד שמציין את <a href="http://www.fileformat.info/info/unicode/char/202c/index.htm">סוף הכיווניות</a> בסופה.<br />
למידע נוסף, ראו <a href="http://www.w3.org/International/questions/qa-bidi-controls.en.php">כאן</a>.</p>
<p>בשעתו, כשלירון כתב את הפוסט שלו, חשבתי לעצמי שזה עשוי להיות פרוייקט קטן וחביב &#8211; לכתוב תוסף לשועל, או סקריפט לקוף הגריז שמאפשר לך לעטוף טקסט שאתה כותב בתווים האלה, לטובת אלה שיבואו אחריך ויקראו את הטקסט שלך. אך מאז התוודעתי לבוקמרקלטים (סימניונות? יש לזה שם בעברית?), ולמדתי להעריך אותם עד מאד. אני חושב שסימניונת היא הדרך הטובה ביותר לפתור את הבעיה הזו, מאחר והן קטנות, קלות להתקנה ועריכה, ו(לפחות בתיאוריה) נתמכות על ידי כל הדפדפנים.<br />
<span id="more-84"></span></p>
<p>כשניגשתי לפתור את העניין, ידעתי שאני צריך להחדיר מחרוזת של תווים לפני ואחרי הטקסט המסומן בשדה-טקסט. ידעתי שראיתי את זה נעשה איפהשהו&#8230; אה, כן! ממש כאן, במערכת של WordPress, כשרוצים לסמן טקסט כמודגש או נטוי.<br />
אז הלכתי למצוא את קוד הג&#8217;אווהסקריפט שעומד מאחורי היכולת הזו (זו פונקציה בשם edInsertTag), והוצאתי את החלקים שרלוונטיים לצורך שלי ולפיירפוקס (הרבה מהפונקציה המקורית נועדה לתאימות דפדפנים).</p>
<p>ללא דיחוי נוסף, אני גאה להציג בפניכם את <a href="javascript:function B(){var s=document.activeElement.selectionStart;var e=document.activeElement.selectionEnd;var v=document.activeElement.value;document.activeElement.value=v.substring(0,s)+'\u202B'+v.substring(s,e)+'\u202C'+v.substring(e,v.length);document.activeElement.selectionStart=s;document.activeElement.selectionEnd=e+2};B();">RTL</a> ואת <a href="javascript:function B(){var s=document.activeElement.selectionStart;var e=document.activeElement.selectionEnd;var v=document.activeElement.value;document.activeElement.value=v.substring(0,s)+'\u202A'+v.substring(s,e)+'\u202C'+v.substring(e,v.length);document.activeElement.selectionStart=s;document.activeElement.selectionEnd=e+2};B();">LTR</a>.</p>
<p>פשוט קחו את הקישורים האלה, וגררו אותם לסרגל כלים של הסימניות שלכם (אני יצרתי לעצמי תיקיה של סימניונות שימושיות), ובפעם הבאה שאתם כותבים טקסט דו-כיווני, סמנו את הקטע שזורם בכיוון הלא-נכון ולחצו על הסימניונת הרלוונטית.<br />
תוכלו לנסות זאת כאן:<br />
<textarea style="direction: ltr; width: 300px;">לחץ על RTL על מנת לתקן</textarea><br />
<textarea style="direction: rtl; width: 300px;">use the LTR כדי לתקן this text</textarea></p>
<p>אשמח לקבל משוב על הסימניונות האלה. הן נוסו אך ורק בפיירפוקס, ולדעתי לא יעבדו בדפדפנים אחרים, מאחר ומהפונקציה שלקחתי מ-WP השארתי רק את החלקים שרלוונטיים לשועל. אם הם עובדים גם בדפדפנים אחרים, או לא עובדים כראוי בשועל, אנא יידעו אותי.</p></div>
<div id="flaresmith" class="feedflare"><script src="http://feeds.feedburner.com/~s/angeredBrackets?i=http://www.angeredbrackets.com/2009/06/%e2%80%ab%d7%94%d7%97%d7%93%d7%a8%d7%aa-%d7%aa%d7%92%d7%99-%d7%aa%d7%9e%d7%99%d7%9b%d7%94-%d7%91%d7%93%d7%95-%d7%9b%d7%99%d7%95%d7%95%d7%a0%d7%99%d7%95%d7%aa-bidi-%d7%91%d7%a9%d7%93%d7%95%d7%aa/" type="text/javascript" charset="utf-8"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.angeredbrackets.com/2009/06/%e2%80%ab%d7%94%d7%97%d7%93%d7%a8%d7%aa-%d7%aa%d7%92%d7%99-%d7%aa%d7%9e%d7%99%d7%9b%d7%94-%d7%91%d7%93%d7%95-%d7%9b%d7%99%d7%95%d7%95%d7%a0%d7%99%d7%95%d7%aa-bidi-%d7%91%d7%a9%d7%93%d7%95%d7%aa/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Inserting BiDi support tags in online Textareas</title>
		<link>http://www.angeredbrackets.com/2009/06/inserting-bidi-support-tags-in-online-textareas/</link>
		<comments>http://www.angeredbrackets.com/2009/06/inserting-bidi-support-tags-in-online-textareas/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 12:34:44 +0000</pubDate>
		<dc:creator>Ethan</dc:creator>
				<category><![CDATA[weekend project]]></category>
		<category><![CDATA[BiDi]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.angeredbrackets.com/?p=71</guid>
		<description><![CDATA[In order to properly write bidirectional text that flows against the direction of the textarea in which you're typing, you should wrap your text in the unicode characters for the correct embedded directionality.
I wrote a bookmarklet that makes doing so a piece of cake.]]></description>
			<content:encoded><![CDATA[<p>This post will only be relevant to readers of right-to-left languages, and to developers who develop for such languages. As such, my next post will be a translation of this one into Hebrew.<br />
A bit over a year ago, a friend of mine <a href="http://eesh.net/blog/?p=234">wrote about embedded unicode right-to-left and left-to-right characters in a flow of text</a>. In a nutshell, when writing text that contains both LTR characters (like English) and RTL characters (like Hebrew), the flow of the text can wind up messed up. Here&#8217;s an example:</p>
<input style="direction: rtl; width: 200px;" type="text" value="The flow of this טקסט is broken" />
<p>The (proper) solution to this conundrum is this: wrap your text, which you want flowing in the opposite direction from it&#8217;s encapsulating element, in the unicode characters for <a href="http://www.fileformat.info/info/unicode/char/202a/index.htm">left-to-right embedding</a> (or <a href="http://www.fileformat.info/info/unicode/char/202b/index.htm">right-to-left embedding</a>), and the <a href="http://www.fileformat.info/info/unicode/char/202c/index.htm">Pop Directional Formatting</a> character. For further reading, go <a href="http://www.w3.org/International/questions/qa-bidi-controls.en.php">here</a>.</p>
<p>Back when Liron wrote that post of his, I thought it would be a nice little project to tackle &#8211; write a Firefox plugin or Greasemonkey user-script that allows you to encapsulate your text in these characters, for the sake of all those who will follow and read it. I have since then become familiar &#8211; and very fond of &#8211; bookmarklets. I think a bookmarklet is the best way to distribute the solution to this problem, because it&#8217;s lightweight, easy to install and modify, and (at least in theory) cross browser.<span id="more-71"></span></p>
<p>Coming to tackle this issue, I knew I needed to insert a string of characters in front of and after the selected text in a textarea. Where have I seen this done before?&#8230; Oh, right, right here in WordPress, when I want to make text I&#8217;m writing bold or italicized.<br />
So I went about finding the Javascript behind that functionality (it&#8217;s the function edInsertTag), and I pulled out of it the bits that are relevant to this situation, and to Firefox.</p>
<p>With no further ado, I present to you <a href="javascript:function B(){var s=document.activeElement.selectionStart;var e=document.activeElement.selectionEnd;var v=document.activeElement.value;document.activeElement.value=v.substring(0,s)+'\u202B'+v.substring(s,e)+'\u202C'+v.substring(e,v.length);document.activeElement.selectionStart=s;document.activeElement.selectionEnd=e+2};B();">RTL</a> and <a href="javascript:function B(){var s=document.activeElement.selectionStart;var e=document.activeElement.selectionEnd;var v=document.activeElement.value;document.activeElement.value=v.substring(0,s)+'\u202A'+v.substring(s,e)+'\u202C'+v.substring(e,v.length);document.activeElement.selectionStart=s;document.activeElement.selectionEnd=e+2};B();">LTR</a>.</p>
<p>Simply drag those two links to your bookmark toolbar (I actually have a bookmark folder just for bookmarklets), and next time you&#8217;re writing bidirectional text, select the wrongly-flowing part, and align it properly.<br />
You can try them out here:<br />
<textarea style="direction: ltr; rows:1; width: 300px;">לחץ על RTL על מנת לתקן</textarea><br />
<textarea style="direction: rtl; rows:1; width: 300px;">use the LTR כדי לתקן this text</textarea></p>
<p>I&#8217;d be happy to get feedback on these bookmarklets. They&#8217;ve only been tested in Firefox, and I think they will not work in other browsers, seeing how I only used one of the three cross-browser-compatibility parts of the wordpress JS I cannibalized. If they do work in other browsers, or do not work as expected in Firefox, please let me know.</p>
<div id="flaresmith" class="feedflare"><script src="http://feeds.feedburner.com/~s/angeredBrackets?i=http://www.angeredbrackets.com/2009/06/inserting-bidi-support-tags-in-online-textareas/" type="text/javascript" charset="utf-8"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.angeredbrackets.com/2009/06/inserting-bidi-support-tags-in-online-textareas/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
