Scripts disappear or are missing when using a Formatted Text and Image (FTI) part

When using a FTI (Formatted Text and Image) part you notice that any scripts you add to the part are deleted once you save and reopen it.
As of NetCommunity 7.1.187.0 the new Tiny MCE text editor has been further integrated into NetCommunity and is now in use in most parts.
This new editor promotes the use of structured HTML.

When adding content using an FTI part, the WYSIWYG editor will automatically generate the source code based on proper HTML structure:
 
<!DOCTYPE html>
<html>
<head>
</head>
<body>
</body>
</html>

In order to add a script using an FTI  part, it must be added between the "<head> </head>" tags while directly editing the Source:
 
<!DOCTYPE html>
<html>
<head>

<script>SCRIPTS MUST BE PLACED BETWEEN THE HEAD TAGS</script>

</head>
<body>

HTML and CSS CAN BE PLACED HERE IF YOU ARE DIRECTLY EDITING THE SOURCE

</body>
</html>

If the "<script> </script>" tags are not added between the "<head> </head>" tags, the scripts will be removed from the FTI part upon saving.

Alternatively, scripts can be added to an Unformatted Text part that can be placed on the page separately and will not modify the HTML structure or remove the script references.

NOTE: Unformatted text parts do not have an editor. All formatting must be done directly in the code.
 

Steps to Duplicate

  1. Open an FTI part.
  2. Click: View > Source to view/edit the HTML
  3. Delete the existing HTML and paste in your code containing the script into the editor or add you script below the existing HTML in the editor
  4. Save.
  5. Click: View > Source to view the HTML again and note that the script references are no longer there.
NOTE: You may notice this behavior if you are running a slideshow using an FTI part and it has stopped working.
 

Was this article helpful?