This is our situation and what we are trying to achieve.
We have the following javascript in the master page of our site. This script is used to call our GIS system and show a map at a given point.
<script language="javascript" type="text/javascript">
function zoomToGIS(theType,param1,param2)
{
var siteURL="http://gis.durham.gov.uk/website/intermap";
if (theType=="layer")
{
//Set the URL to zoom to a postcode.
var theURL = siteURL + "?QUERYLAYER=" + param1 + "&GISQUERY=" + param2
}
if (theType=="grid")
{
var theURL = siteURL + "?X=" + param1 + "&Y=" + param2;
}
//get screen resolution
var screenWidth = screen.width
var screenHeight = screen.height
//check resolution of user machine is OK for GIS
if (screenWidth < 640 || screenHeight < 480)
{
alert("To use the Interactive Mapping Service, your screen resolution should be set to 640 x 480 or greater")
}
else
{
//set sizes for the GIS window, depending upon users screen resolution
var windowWidth=screenWidth * 0.98
var windowHeight=screenHeight * 0.90
//open the GIS in a window
myWin=open(theURL, "displaywindow", "width=" + windowWidth + ",height="+windowHeight+",top=0,left=0,resizable=no,status=no,toolbar=no,menubar=no")
}
}
</script>
In the page layout for the site we have replace the MS richhtml field with the RadEditor
<%@ Page language="C#" Inherits="Microsoft.SharePoint.Publishing.PublishingLayoutPage,Microsoft.SharePoint.Publishing,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" %>
<%@ Register Tagprefix="SharePointWebControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="radE" Namespace="Telerik.SharePoint.FieldEditor" Assembly="RadEditorSharePoint, Version=5.2.0.0, Culture=neutral, PublicKeyToken=1f131a624888eeed" %>
<asp:Content ContentPlaceholderID="PlaceHolderPageTitle" runat="server">
<SharePointWebControls:FieldValue id="PageTitle" FieldName="Title" runat="server"/>
</asp:Content>
<asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">
<radE:RadHtmlField id="ContentRight" FieldName="My_x0020_Page_x0020_Content" runat="server" ToolsFile="~/_controltemplates/Test_ToolsFile.xml" ConfigFile="~/_controltemplates/Test_ConfigFile.xml" allowSpecialTags="True">
</radE:RadHtmlField>
</asp:Content>
In the Test_ConfigFile I have
<?xml version="1.0" encoding="utf-8" ?>
<!-- ==============================================================================================
Config File valid structure:
<configuration>
<property>...</property>
...
<property>
<item>...</item>
<item>...</item>
...
</property>
...
</configuration>
=============================================================================================== -->
<configuration>
<property name="AllowThumbGeneration">True</property>
<property name="ConvertToXhtml">True</property>
<property name="EnableDocking">False</property>
<property name="ShowHtmlMode">True</property>
<property name="ShowPreviewMode">False</property>
<property name="StripAbsoluteAnchorPaths">False</property>
<property name="StripAbsoluteImagesPaths">False</property>
<property name="ToolbarMode">ShowOnFocus</property>
<property name="ToolsWidth">600px</property>
<property name="Skin">Telerik</property>
<property name="NewLineBr">False</property>
<property name="EnableServerSideRendering">False</property>
<property name="StripFormattingOnPaste">Span, Font, MSWord</property>
<property name="OnClientCommandExecuted">OnClientCommandExecuted</property>
<property name="CssFiles"><item>/_wpresources/RadEditorSharePoint/dliEditor.css</item></property>
<property name="SpellDictionaryLanguage">en-GB</property>
<property name="AllowScripts">True</property>
</configuration>
On the page layout I can hardcode a call to the Javascript using
<a href="JavaScript:zoomToGIS('layer','POSTCODE','DH1 5UE')" title="Test Link">Test Link</a>
When the link is clicked a new window opens up and connects to our GIS at the given postcode (DH1 5UE).
However, what we really need to do is be able to enter links such as this in the content area of the page, rather than having them hardcoded.
To do this I have been trying to enter the same link in the html view of the RadEditor. If I switch to design or preview view the link looks like it should when you hover over it. If I then click to publish the page, or check in to shared draft, the link code is only showing as:
<a title="Test Link">Test Link</a>
When I go back into edit mode for the page the html view also shows the same html as above.
We really need to know how to make the link remain as entered.