Overview
www-Sharp HTML editor is one of the most advanced HTML and DHTML editors. It provides tools for manual editing HTML files as well as advanced visual HTML designer.
www-Sharp HTML editor has 4 views:
- Editor - used for manual editing HTML files.
- Preview - used for preview HTML file. Preview shows HTML page in web browser, it does not change source of html page.
- Designer - used for visual designing HTML files. Unlike Preview
it does not execute scripts and changes source of html page. Designer uses MSHTML
engine that is fully compatible with Internet Explorer.
www-Sharp HTML designer has unique tools that greatly simplifies design process. This tools can be accessed by double-clicking HTML element with:
- SHIFT+DBLCLICK: edit element's outerHTML.
- CTRL+DBLCLICK: edit element's DOM - similar to DOM view but with selected element as root.
- ALT+DBLCLICK: edit element with custom designer. Custom designers
can be set by selecting View\Properties in application menu and selecting
User interface\HTML editor entry, Designers tab. You can preset custom designer
for elements with specific HTML tag and even specific className (empty className
means default designer for this tag) . Custom designer is HTML page that is
shown as with window.showModelessDialog. Element object is assigned to window.dialogArguments.
You can manipulate element's properties with script. Note that if you create
new elements with document.createElement() and insert them into designing
HTML document, you should use document object that corresponds to designing
element. Main objects that you can use in your own custom designer are:
- element = window.dialogArguments;
- elementDocument = element.document;
- elementWindow = elementDocument.parentWindow;
- SHIFT+CTRL+DBLCLICK: edit element with ScriptConsole. You can access designing element with Element object in ActiveX scripts (JScript, VBScript etc.) and JScript.Net (requires .Net Framework). For example, select JScript and execute "Host.WriteLn(Element.tagName);" (without quotes). You can get element's document and window as well as in custom editor.
www-Sharp HTML designer supports formatting HTML code with PrettyHTML (PrettyHTML button on toolbar). This lets have good formatted html pages in uniform style. Formatting happens when you switch from designer/DOM view to editor view. You can turn off PrettyHTML to get html page as it is returned by MSHTML.
-
DOM - used for working with DOM structure of HTML document.
DOM viewer has 3 main parts - DOM tree, object inspector and outerHTML editor. You can update object property by changing its value in object inspector. You can update element's outerHTML by pressing CTRL+ENTER in outerHTML editor.