This is a migrated thread and some comments may be shown as answers.

no XHTML output in Sharepoint

8 Answers 211 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
robert d.
Top achievements
Rank 1
robert d. asked on 25 Apr 2007, 02:17 PM
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

8 Answers, 1 is accepted

Sort by
0
robert d.
Top achievements
Rank 1
answered on 26 Apr 2007, 08:35 AM
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
0
Allen DeLaney
Top achievements
Rank 1
answered on 30 Apr 2007, 01:31 AM
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
0
dbacar
Top achievements
Rank 1
answered on 30 Apr 2007, 07:51 AM
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
0
robert d.
Top achievements
Rank 1
answered on 30 Apr 2007, 07:51 AM
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
0
robert d.
Top achievements
Rank 1
answered on 30 Apr 2007, 02:35 PM
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
0
dbacar
Top achievements
Rank 1
answered on 06 May 2007, 02:16 PM
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
 
0
robert d.
Top achievements
Rank 1
answered on 07 May 2007, 07:57 AM
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

0
dbacar
Top achievements
Rank 1
answered on 07 May 2007, 06:58 PM
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.


Tags
WebParts for SharePoint
Asked by
robert d.
Top achievements
Rank 1
Answers by
robert d.
Top achievements
Rank 1
Allen DeLaney
Top achievements
Rank 1
dbacar
Top achievements
Rank 1
Share this question
or