views:

827

answers:

2

So, after much research on whether or not we should the CEWP or the HTML Field Control on an external facing SharePoint site, we settled on using the Field Control (much thanks to AC). Now, we are having an issue that all the blogs I read say should not be an issue.

When we put a relative URL into the HTML Editor and hit OK, it is automatically changed to an absolute URL. This is apparently a "feature" of Internet Explorer from some of the research I have been doing. TinyMCE has a work around for this. I was wondering if there was some work around for the SharePoint control that I am missing.

I took the liberty of creaing a video showing an example of the problem. In case I didn't explain it well enough, you can find that here: www.youtube.com/watch?v=Chwu5W2cCR4

This is kind of a big issue for us because we have an authoring site and the www site. So, when the authoring is done on the authoring site and all the links get migrated to the www site, they are http:// authoring.domain.com/en-us/Pages/... instead of /en-us/Pages/...

(editing to "remove" links)

A: 

Hi John,

We are suffering with this issue too. Were you able to fix it?

Natasha

natasha
If you have a similar question, make a new question, link to this one stating that it wasn't solved adequately and that you need more help.
Welbog
The details of your issue might help someone come up with an answer. Please post it as a separate question.
Bill the Lizard
A: 

Hi - I encountered this issue as well. We had custom site fields and content types deployed via feature. The RichText property of the HTML Field is properly as true in caml, but once deployed the SPField in the root web fields collection and every Pages list the RichText attribute becomes false.

I was able to successfully resolve the issue by using a feature receiver on the feature that deploys the site columns and content types. My code loops every web in the site and then iterates over the fields to update them.

code snippet:

    private void processweb(SPWeb web)
    {
        SPList list = web.Lists["Pages"];

        SPField field;
        for (int i = 0; i < list.Fields.Count; i++)
        {
            field = list.Fields[i];
            //to work around a sharepoint defect ... make html fields work in richtext mode
            if (field != null && string.Compare(field.TypeAsString, "HTML", true) == 0 && (field as SPFieldMultiLineText).RichText == false)
            {
                (field as SPFieldMultiLineText).RichText = true;
                field.Update(true);
            }
        }

        foreach (SPWeb w in web.Webs)
        {
            processweb(w);
        }
    }
Richard Lipton