The Joomla! Community Portal ™

Tue

19

May

2009

Version Control: HTML Code Compare Feature
Written by Victor Carbune   

The first feature mentioned is almost implemented (ready to be tested and bug fixed, if any). The HTML Compare feature helps new users to view the html modifications made on an article, and it will help novice users to better understand html code.

Using a JavaScript function to hide/unhide content, the main modifications made in the html structure code are highlighted, as it can be seen in the images below:

HTML Code feature
 
The feature is implemented by following the current structure of the component, basically using the existing preview compare function and processing the block lines, by inserting div tags in order to hide content. The tags are the decoded using htmlentities, and the content is after that encoded back to the original state.