When inserting one or more paragraphs already formatted with another word processor (e.g. Microsoft Word or OpenOffice), the size of the HTML code could considerably increase. This phenomenon is due to the export methods used by those applications that insert into the HTML code many, and mostly useless HTML tags.
With KTML 4 you can clean-up the HTML code
of these extra tags by using the Clean HTML Content
button from the toolbar:
There are three possibilities from which you can choose:
Clean Word Markup - it removes all the unnecessary Microsoft Word tags.
Clean Inline Styles - it removes all the CSS styles.
Clean All Formatting Tags - it removes all formatting tags from the page, except for the <p> tags (paragraph that includes the selection).
The clean-up process affects the current selection, or the entire page if no selection was made. The result is a cleaner and more accurate code.
Note: The three options apply to the selection and its parent tag. For example, if you select two words in a <p> tag, the command will be applied to the entire paragraph.
In KTML 4, you can define yourself, in a configuration file, the tags that may and may not be present in the page you edit with KTML 4. A tag can be either denied or allowed, it cannot be both at the same time (so be careful when you configure the lists).
The denied and allowed lists are taken into account when you save the content of the page (database, file). For example, if the <b></b> tag is denied and you used it when you just edited the page with KTML 4, when saving the content, this tag will be removed and the text it was applied to will not display as bold anymore.
There is a default tag list defined in case you make no changes in the configuration file. Read more about this in the API documentation.