Tag Info

Hot answers tagged

6

You have two options here. One is to create simple toggle button with this markup: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="8DCC5B17-4B9E-41A7-BA51-65CBC6F8205D" Location="CommandUI.Ribbon" Sequence="10"> ...


6

Interesting Question. I think a better approach is to Create Custom List Column Type that can work as per your business logic. If you still need to use rich text column, please continue reading... :-) Traditional Webparts are actually server side controls which are processed by SharePoint(actually ASP.NET) runtime and the corresponding HTML markup is ...


4

Never ever edit the out of the box javascript files in SharePoint! (For one: a service pack will probably revert all your changes, and it's easy to break your entire farm with a single typo!) I've done something like this for a client, what I did was use IE8 Dev tools to find out the classes used by the Styles applied by the HTMLEditor, make up a CSS file ...


4

Didn't test, but you can probably use SPFieldMultiLineText.GetFieldValueAsText Method : SPListItem yourItem = ....; // obtain the SPListItem with any method SPFieldMultiLineText field = (SPFieldMultiLineText)yourItem.Fields["Content"]; string text = field.GetFieldValueAsText (yourItem["Content"]);


3

I would go with either a .png or a .jpg for the image. To be honest, I'm a little surprised the .pdf worked at all when using it as an image. I think exporting it to one of the other formats (png/jpg) would get you better results.


3

Marc Anderson has a blog post that covers stripping HTML from rich text fields to display the first n number of characters of a field. You can probably use a portion of his post to accomplish what you're looking to do: http://mdasblog.wordpress.com/2009/01/20/displaying-the-first-n-words-of-a-long-text-column-with-xsl/


3

If you dont want to use this string content = Regex.Replace(textWithHTML, "<.*?>", string.Empty); you can use this, this returns the SPListItem as normal text private string getFieldAsText(SPListItem item, string fieldName, string captionName) { return ReferenceEquals(item[fieldName], null) ? string.Empty : ...


3

You should use Text property of the InputFormTextBox control, and parse the first two lines manually. It's quite easy actually, something like this: var firstTwoLines = String.Join("\n", MyRichTextBox.Text.Split('\n').Take(2).ToArray());


3

Actually, you can set it up so that you can use the Rich Text in IE9 (some people believe you have to disable it completely)! You just have to override 3 functions in form.js (I created a file called form.ie9fix.js) and make sure it loads AFTER the "normal" form.js (or form.debug.js, whichever). The functions in question: RTE_DD_GetMenuFrame() ...


3

You can't insert a Web Part into a SharePoint list. SharePoint does not work that way. You add SharePoint Web Parts to a Web Part Page.


3

The styles you are refering in SharePoint are all generated via classes such as "ms-rte". So the issues of replacing or adding others is reduced to introducing new classes (see more here http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/08/16/overriding-sharepoint-2010-rte-css-classes.aspx), do not forget the "ms-name" attribute, as in ...


3

It is probably due to the fact that you already have a site content type in use that you want to add the column to that content type. You need to add a new content type and add it in place of the old one as described here. You also should be able to add it programmatically through C# (which can be translated to powershell) described here. SPSite ...


3

Add 'disable-output-escaping="yes"' in your xslt Example: <xsl:value-of select="@Detail" disable-output-escaping="yes" /> This will fix your problem.


3

Use a Custom Action with Location="ScriptLink" and inject jQuery/JS on the fly, which hides or uncheck the button by default


3

Its showing "View Entries" because you have "Append Changes to Text" turned on. Because of this for any update that is made to an item a new version is getting created.


2

You will probably need to edit the xsl to add a disable-output-escaping attribute. http://blogs.msdn.com/ben_hickman/archive/2009/05/22/content-query-web-part-example.aspx


2

There is also a codeplex venture featuring the StripHTML template. This should give you what your result: http://spxslt.codeplex.com/documentation Cheers, Matt B.


2

Try using the "disable-outscape-escaping" property after xsl:value-of select="@YourField" like this: xsl:value-of select="@Body" disable-output-escaping="yes"


2

Page layouts live in the master page gallery and you can't go higher than the site collection. You will need to either manually copy and apply the modified page layout to other site collections or automate it using PowerShell. You could also develop a feature to deploy your page layout. You would probably end up using PowerShell to activate the feature for ...


2

Your not going to be able to do this with the Multiline Text field type. Anything other than RichTextMode=FullHtml won't even render the contents as HTML (i.e. you won't see the link) and if you set the field to FullHtml the HTML is altered when the item is saved...this happens with pretty much any implementation of the InputFormTextBox control. One ...


2

Maybe you have to change the RichTextMode to FullHTML. SharePoint.. Prefix is referencing the right assembly? --Update-- The InputFormTextBox control actually is a TextArea. With some script you can create a richer experience (RTE_ConvertTextAreaToRichEdit), but not the Ribbon functionalities. Maybe the Content Editor webpart is an alternative? --Update ...


2

To completely understand the above answer, you would require the following reference: http://www.a2zmenu.com/Blogs/SharePoint/Richtext-contol-is-not-working-inside-updatepanel.aspx As suggested above, adding the following two lines after "RTE_TextAreaWindow_OnLoad(richtextContolId)", solved my problem: RTE_GiveEditorFirstFocus(richtextContolId); ...


2

I have resolved this issue. add following lines 2 lines after line "RTE_TextAreaWindow_OnLoad(richtextContolId)"; RTE_GiveEditorFirstFocus(richtextContolId); RTE_TransferIFrameContentsToTextArea(richtextContolId); Please let me know if it helps you...:) Cheers, Yogesh Ghare


2

In SP2010 or SP2007, If the column is of type Multiple lines of text I don't see any issue in editing the column and set the "Specify the type of text to allow" to Rich text


2

No, not that I've seen even in 2007. There are 2 options that I can see. Use a lookup column (point to the title field or something similar) and a workflow on item creation that pulls the data from the associated lookup list that copies the rich text field into it's own rich text field. Or just use a lookup field (point to the title field or something ...


2

@DJ Monzyk this is a follow up javascript file as reference in previous answer function RTE_DD_GetMenuFrame() { var ifmMenu=null; var elemMenu=RTE_DD_GetMenuElement(); if (null !=elemMenu) { if (document.frames.length > 0) { ifmMenu=document.frames[g_strRTETextEditorPullDownMenuID]; } else ...


2

For SharePoint 2010 you could create a custom action to add a button to the ribbon which opens a new page to paste you source code into. Once the user closes the window some Javascript wraps the code into the pre tags and inserts it at the position of the cursor. UPDATE: You could use combination of the zoombldr.aspx page (used to edit the HTML source) and ...


2

We were able to resolve this for our users by installing Microsoft's Access Runtime. Link for SharePoint 2010. Link for SharePoint 2007. Hope this helps.



Only top voted, non community-wiki answers of a minimum length are eligible