no XHTML output in Sharepoint

9 posts, 0 answers
  1. robert d.
    robert d. avatar
    8 posts
    Member since:
    Apr 2007

    Posted 25 Apr 2007 Link to this post

    Hi everybody,

    I was excited to see, that there is a XHTML Editor for Sharepoint. We are developing a SharePoint CMS Site, which is supposed to be valid XHTML. The only problem was the Richtext Editor that MS provided.
    Now I've installed the RadEditor and was glad to see, that it shows proper XHTML in the source view.
    However, after I submit my changes, all that great XHTML code gets destroyed by Sharepoint. Now the output is the same as the Richtexteditor's.
    Is there any possible way, how I can suppress that Sharepoint behaviour? Or did I do anything wrong with my installation?

    Cheers,
    Robert
  2. robert d.
    robert d. avatar
    8 posts
    Member since:
    Apr 2007

    Posted 26 Apr 2007 Link to this post

    Hi!

    I guess, I figured it out myself. Sharpoint filters Richtext-Fields automatically. Now I used a plain text field to store the xhtml-code in. It works flawlessly with the radEditor and I have total controll over the source code now.

    Cheers,
    Robert

  3. Allen DeLaney
    Allen DeLaney avatar
    6 posts
    Member since:
    Apr 2006

    Posted 29 Apr 2007 Link to this post

    I am having the same issue with the Rich Text field.  I am assuming that you are using some sort of custom list to store your content, right?  If so, will you please explain how you go about getting the rad control to work for the plain text field?

    Thanks,
    Allen
  4. dbacar
    dbacar avatar
    8 posts
    Member since:
    Feb 2007

    Posted 30 Apr 2007 Link to this post

    Yes I can't see any radeditor controls for the multiline text->plain text option. How can we enable the radeditor for the field?

    Thanks
  5. robert d.
    robert d. avatar
    8 posts
    Member since:
    Apr 2007

    Posted 30 Apr 2007 Link to this post

    Hi Allen,

    to use the text field, I created a new content type, which derives from the page type. Then I created a Layoutpage with the RAD-Control hooked to the multiline textfield of my content type.

    The only thing about that approch is that you cannot use the editor in Sharepoints edit page - form. You only see the plain html-source in that view.

    Cheers,
    Robert
  6. robert d.
    robert d. avatar
    8 posts
    Member since:
    Apr 2007

    Posted 30 Apr 2007 Link to this post

    Hey dbacar,

    just use the source view. I don't think I got it to work in the WYSIWYG-view of Sharepoint Designer either.

    Cheers,
    Robert
  7. dbacar
    dbacar avatar
    8 posts
    Member since:
    Feb 2007

    Posted 06 May 2007 Link to this post

    Hi rdraeger,
    Can you give some more hints about your solution? What I understood is you created a custom aspx page in _layouts folder and you somehow bind the multiline textfield to your rad editor control.

    Do you use the radeditor? Or the asp.net version? How did you manage the bind?

    Did you write the save method yourself? I guess you did.

    thanks in advance
     
  8. robert d.
    robert d. avatar
    8 posts
    Member since:
    Apr 2007

    Posted 07 May 2007 Link to this post

    Hey dbacar,

    It's not that complicated at all. All I did was create a new Layoutpage in the Masterpage Gallery through the webinterface.
    Since the normal page content types use the rich html field for the content I created a new content type derived from the page content type. But you can skip that step and just use a different field in the page content type which contains plain text.
    Then I opened that newly created layout page in Sharepoint Designer and added the RadEditor control.
    After you've created the layout page, you can create new pages on your webinterface and choose the new layout.
    You don't have to modify anything at all.
    All I added to the layout page was following:

    <%@ Register TagPrefix="rad" Namespace="Telerik.SharePoint.FieldEditor" Assembly="RadEditorSharePoint, Version=4.0.0.0, Culture=neutral, PublicKeyToken=1f131a624888eeed" %>

    <rad:RadHtmlField FieldName="plainTextField" runat="server" DisplayWidth="100%"></rad:RadHtmlField>

    If that doesn't look familiar, you should reconsult the installation notes for the RadEditor.

    HTH,
    Robert

  9. dbacar
    dbacar avatar
    8 posts
    Member since:
    Feb 2007

    Posted 07 May 2007 Link to this post

    Hi Rdraeger,
    Thanks for the information. I see that you are using MOSS 2007. We are using wss 3.0. I guess your method won't work with wss 3.0. Anyway thanks for sharing.


Back to Top