How to create sub lists in the Visual Editor

To create sub-lists under the default Visual Editor you have to follow these steps.

  1. Create a list by entering the first list item (1), then click the Ordered list icon (2).
  2. Then if you want to create a sub-list please hit Enter after Top item 1 text to create a new empty list item (1), then click icon (2) and click the Increase Indent icon (3):
  3. The Visual Editor will create a new sub-list item (1), optionally you can change the list type by clicking the list type icon (2):
  4. If you want to end that sub-list, then just create a new sub-list item (1) and click the Decrease Indent (2) icon:
  5. Now you can enter new items for your top list:

To create sub-lists under TinyMCE Visual Editor you have to follow these steps.

  1. Create a list by entering the first list item (1), then click the … dots icon (2) to see all Visual Editor icons, and click the Numbered list icon (3).
  2. Then if you want to create a sub-list please hit Enter after Top item 1 text to create a new empty list item and click the Increase Indent icon:
  3. Visual Editor will create a new sub-list item (1), optionally you can change the list type by clicking the list type icon (2):
  4. If you want to end that sub-list, then just create a new sub-list item (1) and click the Decrease Indent (2) icon:
  5. Now you can enter new items for your top list:

If you want to change sub list type, just click at the first item on your sub list to place editor cursor (1) there and click either numbered (2) or not list type icons:

Clicking the Lower Alpha list type will change the list type like this:

Convert Word documents with images to HTML and then post them to a CMS like WordPress

If you are using our service to prepare content for pasting into a CMS like WordPress this feature can save you a lot of time and effort. Basically, it gives you the option to change the image links to the actual path of the site you will be putting the content on.

If your HTML contains images that are stored on WordToHTML.net (either you have uploaded them via Visual Editor File Manager or you have used Upload file & convert to HTML feature) and you would like to quickly add your HTML content and images to any CMS then you can use the ‘Custom media URL’ option shown when you use the ‘Download HTML with media’ option:

If we detect media files then we will show the following screen where you can optionally enter a custom media URL that will be prepended to all images in HTML.

For instance when using WordPress, if your media files are not organized under month/year folders (you can check it on your WordPress dashboard Settings -> Media page) then you can enter /wp-content/uploads/ and WordToHTML.net will automatically add this relative URL to all <img src=”…” /> src attributes in HTML.

If you do not enter any value then nothing will be added to image files, there will be only file names in src attributes.

Once you click the Next button we will generate a zip file that will contain your HTML file and all related images.

After that you can unzip the downloaded file, then upload all images on your website (via WordPress admin or FTP).

For instance on WordPress admin Media just click Select Files and then go to a unzipped folder where images are stored. Also you can Drag & drop images here:

Then either copy HTML to clipboard from Word to HTML or open the HTML file in any text editor (Notepad for instance) and copy the HTML to the clipboard and then paste it into your CMS.

For instance in WordPress  you have to switch to Text mode (step 1 in Classic editor) and then paste HTML step 2:

After that you can switch back to Visual mode and check if  you see images etc. After that you can save your page.

Manage Tags & Attributes

This feature lets you customize the tags and their attributes. You can add and delete attributes, for example, say you had this code in your file:

<p>First paragraph.</p>

And you wanted to apply your CSS Stylesheet to the text, then you could use this feature to add this attribute:

<p class="className">First paragraph.</p>

Actions

Add attribute
Remove attribute
Append HTML to elements
Prepend HTML to elements
Remove elements
Wrap elements
Wrap inner content of elements
Unwrap elements
Replace elements


Here is an overview of the section options

1 – Tag or attribute actions drop down – select what you would like to do.

2 – HTML tag or comma separated tags (elements) like p, span, div or selector like div.p or .someClass
More info about selectors: https://www.w3schools.com/cssref/css_selectors.asp

3 – HTML attributes like id, class, style etc. Please note that class and style attributes at treated differently if you enter some values for them.
4 – Enumerate attribute values on/off.

5 – Start number when enumerating attribute values.

6 – Attribute or tag values. This field can contain HTML too.

7 – List of actions that will be performed on HTML.


Add attribute examples:

Add a class attribute to p tags. Input HTML:

<p>First paragraph.</p>

<p>Second paragraph.</p>

<p>Third paragraph.</p>

<div>

Last section.

</div>

Output HTML after clicking Cleanup my HTML green button:

<p class="className">First paragraph.</p>

<p class="className">Second paragraph.</p>

<p class="className">Third paragraph.</p>

<div>

Last section.

</div>

Please note that div tag does not have a class attribute.


Add class attribute to p and span tags. Input HTML:

<p>First paragraph.</p>

<p>Second paragraph.</p>

<p>Third paragraph.</p>

<span>Fourth line.</span>

<div>

Last section.

</div>

Output HTML:

<p class="className">First paragraph.</p>

<p class="className">Second paragraph.</p>

<p class="className">Third paragraph.</p>

<span class="className">Fourth line.</span>

<div>

Last section.

</div>

Please note that div tag has no class attribute only p and span tags.


Add enumerated (starts from 1) id to p tags. Input HTML:

<p>First paragraph.</p>

<p>Second paragraph.</p>

<p>Third paragraph.</p>

Please note that you can add numbers (enumerate any attributes, but usually it only makes sense for id attribute).

Output HTML:

<p id="prefix1">First paragraph.</p>

<p id="prefix2">Second paragraph.</p>

<p id="prefix3">Third paragraph.</p>


Add a class to p tags. Input HTML:

<p>First paragraph.</p>

<p>Second paragraph.</p>

<p>Third paragraph.</p>

Output HTML:

<p class="className">First paragraph.</p>

<p class="className">Second paragraph.</p>

<p class="className">Third paragraph.</p>


Add or replace a single CSS style to p tags. Input HTML:

<p style="color: red">First paragraph.</p>

<p>Second paragraph.</p>

<p>Third paragraph.</p>

Note: to add or replace particular CSS style please enter only one CSS rule. If you enter more rules then whole style attribute value will be replaced if style attribute already exists for a given tag.

Output HTML:

<p style="color: red; font-weight: bold;">First paragraph.</p> 

<p style="font-weight: bold;">Second paragraph.</p> 

<p style="font-weight: bold;">Third paragraph.</p>

Remove className CSS class from p tags. Input HTML:

<p class="className className2">First paragraph.</p>

<p class="className className2">Second paragraph.</p>

<p class="classNameTest">Third paragraph.</p>

className was removed from first two p tags. Output:

<p class="className2">First paragraph.</p>

<p class="className2">Second paragraph.</p>

<p class="classNameTest">Third paragraph.</p>


Remove class attribute from all p tags. Input HTML:

<p class="className2">First paragraph.</p>

<p class="className2">Second paragraph.</p>

<span class="classNameTest">Third paragraph.</span>

Value field has to be empty in order to delete all class attributes from p tags.

Output HTML:

<p>First paragraph.</p>

<p>Second paragraph.</p>

<span class="classNameTest">Third paragraph.</span>


Remove class attribute from every HTML tag (element). Input HTML:

<p class="className2">First paragraph.</p>

<p class="className2">Second paragraph.</p>

<span class="classNameTest">Third paragraph.</span>

Enter * char in tag field in order to remove class from every HTML element. Please note that * char can be used for other tag actions too.

Output:

<p>First paragraph.</p>

<p>Second paragraph.</p>

<span>Third paragraph.</span>


Remove class attribute from <span> tags inside <p> tags. Input HTML:

<p class="className">First paragraph.</p>

<span class="classNameTest">Second paragraph.</span>

<p>

<span class="classNameTest">Third paragraph.</span>

</p>

Entering ‘p span’ means that all <span> tags inside of <p> tags will be affected.

Only class attribute from ‘Third paragraph’ span tag was removed. Output:

<p class="className">First paragraph.</p>

<span class="classNameTest">Second paragraph.</span>

<p>

<span>Third paragraph.</span>

</p>


Append HTML to elements (tags). Input HTML:

<p>First paragraph.</p>

<p>Second paragraph.</p>

<p>Third paragraph.</p>

Each <p> tag was added <span class=”red”>some text</span> before ending </p>. Output:

<p>First paragraph.<span class="red">some text</span></p> 
<p>Second paragraph.<span class="red">some text</span></p> 
<p>Third paragraph.<span class="red">some text</span></p>

Prepend HTML to elements (tags). Input HTML:

<p>First paragraph.</p>

<p>Second paragraph.</p>

<p>Third paragraph.</p>

Each p tag was added <span class=”red”>some text</span> after starting <p>. Output:

<p><span class="red">some text</span>First paragraph.</p> 
<p><span class="red">some text</span>Second paragraph.</p> 
<p><span class="red">some text</span>Third paragraph.</p>

Remove elements from HTML. Input HTML:

<p>First paragraph.
<span class="red">some text</span>
</p> 
<p>Second paragraph. 
<span class="red">some text</span>
</p> 
<p>Third paragraph. 
<span class="red">some text</span>
</p>
<span class="red">some other text</span>

Selector ‘p span’ will remove all <span> tags in <p> tags. Last <span> was not removed because it was not inside of <p> element. Output HTML:

<p>First paragraph.</p> 
<p>Second paragraph.</p> 
<p>Third paragraph.</p>
<span class="red">some other text</span>

Wrap <p> tags with <div> elements. Input HTML:

<p>First paragraph.</p> 
<p>Second paragraph.</p> 
<p>Third paragraph.</p>

Each <p> tag will be wrapped with <div class=”wrapped”>… </div>. Output HTML:

<div class="wrapped"><p>First paragraph.</p></div> 
<div class="wrapped"><p>Second paragraph.</p></div> 
<div class="wrapped"><p>Third paragraph.</p></div>

Wrap <p> tags inner content with <div> elements. Input HTML:

<p>First paragraph.</p> 
<p>Second paragraph.</p> 
<p>Third paragraph.</p>

Each inner text inside of <p> tags will be wrapped with <div class=”innerWrap”>…</div>. Output HTML:

<p><div class="innerWrap">First paragraph.</div></p> 
<p><div class="innerWrap">Second paragraph.</div></p> 
<p><div class="innerWrap">Third paragraph.</div></p>

Unwrap <p> elements (remove surrounding <p> elements but keep inner content). Input HTML:

<div><p>First paragraph.</p></div>
<div><p>Second paragraph.</p></div> 
<div><p>Third paragraph.</p></div>

Output HTML:

<div>First paragraph.</div>
<div>Second paragraph.</div> 
<div>Third paragraph.</div>

Unwrap <div> elements (remove surrounding <div> elements but keep inner content). Input HTML:

<div><p>First paragraph.</p></div>
<div><p>Second paragraph.</p></div> 
<div><p>Third paragraph.</p></div>

Output HTML:

<p>First paragraph.</p>
<p>Second paragraph.</p> 
<p>Third paragraph.</p>

Replace elements with HTML or text. Input HTML:

<div><p>First paragraph.</p></div>
<div><p>Second paragraph.</p></div> 
<div><p>Third paragraph.</p></div>

Every <p>…</p> tag was replaced with <span>replacement text</span>. Output HTML:

<div><span>replacement text</span></div>
<div><span>replacement text</span></div> 
<div><span>replacement text</span></div>

Using find and replace

You can use the find and replace section to further customize your HTML. You can search for any text and replace or delete it. Find and replace supports regular expressions. You can have multiple several find and replace entries and you can also choose the order in which they run (entries are executed from first to last).

Please note that every occurrence of a given text to find will be replaced or deleted.

Usage examples

Simple find and replace of text in HTML

  1. Select some text in your HTML Editor (1) and click Add to Find button (2). Word to HTML will automatically add selected text into the find input field (3). The same can be done with Ctrl+C (copy) and Ctrl+V (paste).
  2. Then add replacement text (4) or leave it empty if you want to delete given text occurrences from HTML.
  3. Click Add button (5). You should see the find and replace item on the list (6).

Click the Cleanup HTML green button (located below the HTML editor) to see the results of find and replace:


Delete HTML or text

  1. Select some text in your HTML Editor (1) and click the Find and Delete button (2). Word to HTML will automatically add selected content into items to delete (3).

Click the Cleanup HTML green button to see the results of find and replace. As you can see below <p>Text to delete…</p> was removed:


Change all <p>…</p> to <span>…</span> tags (basic scenario without regular expressions)

Input HTML:

<p>First paragraph.</p>
<p>Second paragraph.</p>
<p>Third paragraph.</p>

Find and replace items:

Output HTML after cleanup (all p tags changed to span tags):


Change all <p…>…</p> to <span…>…</span> tags (more advanced scenario with regular expressions)

Usually, HTML start tags contain attributes so find and replace is not that simple and the best way to do it is to use regular expressions.
Input HTML:

<p>First paragraph.</p>
<p id="test">Second paragraph.</p>
<p style="color: red">Third paragraph.</p>

In order to find (match) any <p…> tag you have to use regular expressions (1). Basically <p([^<>]*)> will find any <p…> start tag. Replace value (2) has $1 which means that anything that was found/matched by ([^<>]*) will be copied to replace value. In order to use regular expressions please tick ‘Use regular expression’  checkbox (3). Below you can see find and replace with regex on the list (4).

Output HTML after cleanup (all p tags changed to span tags and all attributes are there):


Typical uses for find and replace

  • Replacing words or phrases in your text
  • Changing font types, e.g. change Arial to Verdana, modify CSS styles
  • Find and delete code you do not need

More information about regular expressions (RegEx)

Advanced users can use regular expressions to create more powerful find and replace commands. This is a good introductory guide to RegEX https://www.w3schools.com/js/js_regexp.asp

Using the HTML cleanup options

These options let you easily control what you want to be removed from your code. All you have to do is enable the toggle of the options you need.

You can hover over any option to see more information:

Remember you always need to click the green ‘Cleanup HTML’ button to run the options, it is not automatic.

Cleanup HTML button

If you don’t like how an option affected your code you can click the undo button above the HTML code editor to revert it to how it was, then you can try a different option.

Undo HTML changes

 

Creating cleanup templates

When you find the cleanup options that work best for you, you can easily save them to a template for future use.

Every option you have in the HTML cleanup section, find and replace, CSS styles to keep/remove, manage tags & attributes and custom Javascript will be saved to your template file.

All you have to do is click the blue save button to save your template. You can then reuse your template anytime by selecting it from the drop-down templates list.

If you click on the arrow to the right of the save button you will be able to rename, duplicate, reload, share, and delete your template.

It is important that you click the green Cleanup HTML button to run your template.

If you are not happy with the results then click the Undo icon in the HTML editor and then change cleanup options and again click the Cleanup HTML button until you are happy with your HTML.

Upload and convert Word, PDF and other documents to HTML

Word to HTML lets you upload or drag and drop your documents to convert them to HTML instantly. All you have to do is click the blue upload button to select your file or drag and drop a document into the white section.

After your document is converted you can either Edit it in the Visual Editor, you can Preview, Download, or Delete it if you want to remove it permanently from our servers right away after you have downloaded or copied converted HTML.

Batch convert documents to HTML

Our Business Plan users can upload and convert more than one document at once. Just select and upload more than one document or drag and drop more than one document into this section.

The file formats we support are:

  • MS Word DOC and DOCX format
  • PDF format
  • RTF Rich text format
  • ODT Open doc format
  • HTML and text files

Embed images

Selecting the embed images option converts your images to code. This means you do not need to have separate image files, everything is in one document. This option is used when pasting images into Visual Editor as well. This option is useful for small images like graphics but if you have a lot of images in the file it may increase the size and complexity of the code a lot. Be aware when you embed images the code can look strange, you will see lots of random-looking code as shown in the screenshot below. But don’t worry when you put the HTML live the images will show ok.

Full page mode

Are you creating standalone HTML files? No problem, this option adds the <head> and <body> to HTML, you need this so the page displays correctly. If you are pasting into a web-based system like WordPress, Amazon, eBay, etc. you will not need this option.

Fixed HTML

If you need your HTML to look exactly like your input document then tick this fixed HTML option, but please be aware that the fixed layout may not look great on mobile devices. It’s useful when used as a standalone HTML page or when shown in an <iframe>. This option enables the Full page mode option which is required to display fixed HTML pages correctly.

Auto Cleanup

If you enable this option Word to HTML will automatically run a cleanup options or template you have selected. No need to click the Cleanup HTML button if this option is enabled.

You can also Auto Save updated and cleaned-up HTML. Just enable the last option on the right (save icon).

Converting images to text with OCR

If your PDF file has scanned text content in an image format Word to HTML will attempt to OCR it and convert it to text.

Resizing editors

The interface can be changed to suit your needs. By clicking the arrows between the two editors you can choose to make one larger or smaller:

 

You can change both Visual and Code editor height by dragging up or down the bottom bar in the Visual Editor:

 

In order to set the default editor height you can set it in the Preferences:

When using TinyMCE editor you can change both Visual and Code editor height by dragging the corner of TinyMCE editor:

Full-screen mode

In the Visual editor and the code editor, you can choose to go full screen.

Quick start guide

Word to HTML is super simple to use. All you have to do is paste your text into the Visual Editor box on the left side or you can create your content directly in the editor.

We will automatically convert your text to HTML code as you type, you don’t need to do anything. Your code will appear on the HTML Code Editor on the right.

When you have finished you can just copy the code from the code editor to the clipboard or you can save it online on WordToHTM and edit it later or download it.

Watch our quick less than 2 minutes feature overview video:

Cleaning up your HTML code

With our powerful cleanup options and find and replace processing, you can improve your code with a few simple clicks. You can even use more advanced features like Manage Tags & Attributes or even add your own custom Javascript code in order to change HTML in any way.  Just turn on the options you want to remove then click the green ‘Clean HTML’ button. You need to click the green button every time you change any option in the cleanup section.

Saving HTML online

You can save your documents so you can work on them later. Just click the blue Save button. WordToHTML has an Autosave feature (enabled by default, but you can disable it in the Preferences) which means we save your work for you automatically every 5 minutes. If you turn this off you need to remember to hit the Save button to save your work.

Exporting files

You can export your files in HTML, Word DOCX, PDF, or EPUB format. All you have to do is click the drop-down icon next to the Save button, then select the export format you want:

Use google fonts or other web fonts

Google fonts are a great way to make your web pages more visually appealing. Hundreds of great-looking fonts are available, and best of all they are free.

One way to use custom fonts is to add custom CSS to your HTML page as shown in the screenshot below. Also, you can view this sample code here: custom Font Example HTML

Please note that the best place to add your custom fonts CSS is either <head> tag or add this CSS in your web page style file. The example below has CSS that adds google web Lato font as ‘CustomFont’ in <head> tag, but it may even work if you CSS <style> tag in your HTML page body.

Another way is to define your fonts in Settings:

  1. Go to the Google Fonts website to get your font links.
  2. Select the font you want to use, optionally customize it and copy it’s link as shown on the screenshot below.

  1. Enter the font name (or names) into the custom fonts section on the Settings page
  2. Paste the font link (or links) into the font URL box

If you want to use more fonts just enter the font links and names separated by the # char.

Once your fonts are defined you can then select them in the visual editor: