})
 
 
-def file_html(request, path):
-    return direct_to_template(request, 'explorer/file_html.html', extra_context={
-        'object': html.transform(repo.get_file(path).data(), is_file=False),
-        'hash': path,
-        'image_folders_form': forms.ImageFoldersForm(),
+def htmleditor_panel(request, path):
+    return direct_to_template(request, 'explorer/panels/htmleditor.html', extra_context={
+        'html': html.transform(repo.get_file(path).data(), is_file=False),
     })
  
 
 
 /* ================= */
 /* = Gallery panel = */
 /* ================= */
-.images-wrap {
+.images-wrap, .htmleditor {
     overflow-x: hidden;
     overflow-y: scroll;
 }
 
         resizePanels();
     })
     
-    $('#left-panel-wrap').bind('resizable:resize', resizePanels)
+    $('#left-panel-wrap').bind('resizable:stop', resizePanels)
         .resizable('#slider', {minWidth: 8});
     
     resizePanels();
 
                             <label for="select-left-panel">Lewy panel:</label>
                             <select name="select-left-panel" id="select-left-panel">
                                 <option value="{% url xmleditor_panel hash %}">Edytor XML</option>
+                                <option value="{% url htmleditor_panel hash %}">Edytor HTML</option>
                                 <option value="{% url gallery_panel hash %}">Galeria skanów</option>                            
                             </select>
                         </div>
                         <label for="select-right-panel">Prawy panel:</label>
                         <select name="select-right-panel" id="select-right-panel">
                             <option value="{% url xmleditor_panel hash %}">Edytor XML</option>
-                            <option value="{% url gallery_panel hash %}">Galeria skanów</option>                            
+                            <option value="{% url htmleditor_panel hash %}">Edytor HTML</option>
+                            <option value="{% url gallery_panel hash %}">Galeria skanów</option>
                         </select>
                     </div>
                     <div id="right-panel-contents" class="panel-contents">
 
--- /dev/null
+<div class="panel">
+    <div class="htmleditor">
+        {{ html|safe }}
+    </div>
+</div>
+<script type="text/javascript" charset="utf-8">
+    (function() {
+        function resizeEditor(event, panel) {
+            var panel = panel || event.data.panel;
+            $('.htmleditor', panel).height($(panel).height());
+        }
+
+        panel(function(event, panel) {
+            $(window).bind('resize', {'panel': panel}, resizeEditor);
+            resizeEditor(null, panel);  
+        }, function(event, panel) {});
+    })()
+</script>
\ No newline at end of file
 
     # Example:
     url(r'^$', 'explorer.views.file_list', name='file_list'),
     url(r'^file/(?P<path>[^/]+)/$', 'explorer.views.file_xml', name='file_xml'),
-    url(r'^html/(?P<path>[^/]+)/$', 'explorer.views.file_html', name='file_html'),
     url(r'^images/(?P<folder>[^/]+)/$', 'explorer.views.folder_images', name='folder_image'),
     url(r'^images/$', 'explorer.views.folder_images', {'folder': '.'}, name='folder_image_ajax'),
     
     # Editor panels
-    url(r'^editor/(?P<path>[^/]+)/panels/xmleditor$', 'explorer.views.xmleditor_panel', name='xmleditor_panel'),
-    url(r'^editor/(?P<path>[^/]+)/panels/gallery$', 'explorer.views.gallery_panel', name='gallery_panel'),
+    url(r'^editor/(?P<path>[^/]+)/panels/xmleditor/$', 'explorer.views.xmleditor_panel', name='xmleditor_panel'),
+    url(r'^editor/(?P<path>[^/]+)/panels/gallery/$', 'explorer.views.gallery_panel', name='gallery_panel'),
+    url(r'^editor/(?P<path>[^/]+)/panels/htmleditor/$', 'explorer.views.htmleditor_panel', name='htmleditor_panel'),
     
     # Admin panel
     url(r'^admin/doc/', include('django.contrib.admindocs.urls')),