Hot answers tagged

7

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 ...


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 ...


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"> ...


5

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"]);


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

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 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

Whether a known bug, as some sources claim, or a missing capability, SharePoint 2010 doesn't allow anything more than plain text to be used in a column on a library or picture library. Regardless, there is a workaround. An IT tech on our SharePoint team found the article "Add Multiline Rich Text/Enhanced Rich Text column to document library or picture ...


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

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

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.


3

Yes you can do this by modifying the master page and adding a little bit of JavaScript. Rich Text Editor support pasting Rich Text as-is as well as Plain Text. In your case you need to enable the Plain Text mode. For that first get the available modes RTE.RtePasteManager.get_pasteModes() And set the Plain Text mode ...


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

Explanation Based on your affirmative response to my comment, I've gone ahead and wrote this using the JSOM API. The script works by disabling the ReadOnly property on the RichMessage field, updating the values on your target item, and re-enabling the ReadOnly field. Up until now, this is the only working strategy I've found to change read-only fields from ...


2

As per your link I assumed that you have done following process. you have created column in your list and same column you have added in the document library. that means you have created Multi Line of text(with rich text) site column and added same column to list as well as library and you are creating document from template(in template you have added ...


2

You can add the InputFormTextBox : <SharePoint:InputFormTextBox runat="server" ID="idRichTxtBox" Rows="10" RichText="true" TextMode="MultiLine" RichTextMode="FullHtml" AllowHyperlink="true" ></SharePoint:InputFormTextBox>


2

I've found a way to do this in javascript. The languages are not actually removed and the script must be run every time a page loads in edit mode, but the result is that any language(s) can be hidden from the spell-checker list. The languages available to the spell checker is exposed in a global javascript object window.spellcheck; //The spellcheck object ...


2

This is a known issue with the rich text editor. The hyperlinks will be removed unless they start with /, http, or https (might be a couple of others, but it's limited). Not a whole lot that can be done, you might consider storing the URLs in a separate column that doesn't go through the same rules.


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

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

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

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

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

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.



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