<?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>Boris Masis - Personal Homepage &#187; ballroom</title>
	<atom:link href="http://borism.net/category/ballroom/feed/" rel="self" type="application/rss+xml" />
	<link>http://borism.net</link>
	<description></description>
	<lastBuildDate>Mon, 24 Aug 2009 20:31:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Insert Arbitrary HTML into Umbraco Pages</title>
		<link>http://borism.net/2009/02/18/insert-arbitrary-html-into-umbraco-pages/</link>
		<comments>http://borism.net/2009/02/18/insert-arbitrary-html-into-umbraco-pages/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 22:00:19 +0000</pubDate>
		<dc:creator>boris</dc:creator>
				<category><![CDATA[ballroom]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[umbraco]]></category>

		<guid isPermaLink="false">http://www.borism.net/?p=100</guid>
		<description><![CDATA[We have the Umbraco CMS (version 3) configured to use TinyMCE for WYSIWYG editing. It works quite well up until we want to insert some HTML content that TinyMCE strips out (like an embedded youtube video, or a screencast) Here&#8217;s how to create a very simple Umbraco macro (using a c# user control) to allow [...]]]></description>
			<content:encoded><![CDATA[<!-- wp-jquery-lightbox, a WordPress plugin by ulfben --> <p>We have the <a href="http://www.umbraco.org">Umbraco CMS</a> (version 3) configured to use TinyMCE for WYSIWYG editing. It works quite well up until we want to insert some HTML content that TinyMCE strips out (like an embedded youtube video, or a screencast)</p>
<p>Here&#8217;s how to create a very simple Umbraco macro (using a c# user control) to allow you to insert arbitrary HTML code that won&#8217;t interfere with TinyMCE:</p>
<p>Create a visual studio solution and create InsertHTML.ascx with the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;</span> <span style="color: #008000;">%</span>@ Control Language<span style="color: #008000;">=</span><span style="color: #666666;">&quot;C#&quot;</span> AutoEventWireup<span style="color: #008000;">=</span><span style="color: #666666;">&quot;true&quot;</span> Codebehind<span style="color: #008000;">=</span><span style="color: #666666;">&quot;InsertHTML.ascx.cs&quot;</span>
    Inherits<span style="color: #008000;">=</span><span style="color: #666666;">&quot;YourNameSpace.InsertHTML&quot;</span> <span style="color: #008000;">%&gt;</span>
<span style="color: #008000;">&lt;</span> <span style="color: #008000;">%=</span>HTMLCode<span style="color: #008000;">%&gt;</span></pre></div></div>

<p>The code-behind InsertHTML.ascx.cs just needs to have:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Collections</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Web</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Web.Security</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Web.UI</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Web.UI.WebControls</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Web.UI.WebControls.WebParts</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Web.UI.HtmlControls</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF;">namespace</span> YourNameSpace
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">partial</span> <span style="color: #FF0000;">class</span> InsertHTML <span style="color: #008000;">:</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Web</span>.<span style="color: #0000FF;">UI</span></span>.<span style="color: #0000FF;">UserControl</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #0600FF;">private</span> <span style="color: #FF0000;">string</span> __HTMLCode <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">;</span>
&nbsp;
        <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">string</span> HTMLCode
        <span style="color: #000000;">&#123;</span>
            get
            <span style="color: #000000;">&#123;</span>
                <span style="color: #0600FF;">return</span> __HTMLCode<span style="color: #008000;">;</span>
            <span style="color: #000000;">&#125;</span>
            set
            <span style="color: #000000;">&#123;</span>
                __HTMLCode <span style="color: #008000;">=</span> value<span style="color: #008000;">;</span>
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Build your DLL, drop it into the umbraco bin folder, and put the .ascx file in the \usercontrols\ directory. You&#8217;re almost done. Go to Developer -> Macros and create a new macro called &#8220;Insert HTML.&#8221; Point it to the user control on the server and be sure to check &#8220;use in editor.&#8221; Lastly, on the &#8220;Parameters&#8221; tab add a textMultiLine parameter and call it HTMLCode.</p>
<p>You should now see the &#8220;Insert HTML&#8221; macro as one of the options when you click the macro button in the TinyMCE editor. And we&#8217;re done.</p>
<p>Here&#8217;s a solution file extracted from my project:<br />
<a href='http://www.borism.net/wordpress/wp-content/uploads/2009/02/inserthtml.zip'>Download Solution</a></p>
]]></content:encoded>
			<wfw:commentRss>http://borism.net/2009/02/18/insert-arbitrary-html-into-umbraco-pages/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The Weekend @ Princeton</title>
		<link>http://borism.net/2006/05/01/12/</link>
		<comments>http://borism.net/2006/05/01/12/#comments</comments>
		<pubDate>Mon, 01 May 2006 10:16:14 +0000</pubDate>
		<dc:creator>boris</dc:creator>
				<category><![CDATA[ballroom]]></category>

		<guid isPermaLink="false">http://www.borism.net/2006/05/01/12/</guid>
		<description><![CDATA[Some pretty hot dancing this weekend at the Princeton Ballroom Competition. Gherman Mustuc and Iveta Lukosiute didn&#8217;t mess around. They put on a full 6 or 7 dance show at the ball the night before, very impressive. Prema and I placed 4th in Silver Swing/Mambo. And of course good times were to be had in [...]]]></description>
			<content:encoded><![CDATA[<!-- wp-jquery-lightbox, a WordPress plugin by ulfben --> <p>Some pretty hot dancing this weekend at the <a href="http://www.princeton.edu/~pbdc/compinfo.shtml">Princeton Ballroom Competition</a>. Gherman Mustuc and Iveta Lukosiute didn&#8217;t mess around. They put on a full 6 or 7 dance show at the ball the night before, very impressive.</p>
<p>Prema and I placed 4th in Silver Swing/Mambo. And of course good times were to be had in Miles&#8217; accord coupe during the trip there and back <img src='http://borism.net/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
<a rel="lightbox" title="Gherman Mustuc and Iveta Lukosiute" href="http://www.borism.net/wp-main/images/2006.04.29%20Princeton%20Competition%2016.jpg"><br />
</a></p>
<div align="center"><a rel="lightbox" title="Gherman Mustuc and Iveta Lukosiute" href="http://www.borism.net/wp-main/images/2006.04.29%20Princeton%20Competition%2016.jpg"><img border="0" alt="Princeton Competition" src="http://www.borism.net/wp-main/images-small/2006.04.29%20Princeton%20Competition%2016.jpg" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://borism.net/2006/05/01/12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
