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


6

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


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


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

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

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

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

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

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


2

You probably need to develop the following: A web part which generate html with A div which contains ajax to get the list of wiki pages, and when a page is selected ajax to get the anchors on that page jQueryUI to hide/show that div as a dialog Icon/link to activate jQueryUI A web service to respond to the above ajax calls A page layout to allow you to ...


2

You can do one of two things here: 1) You can override the default fonts. NothingButSharePoint has a good tutorial: https://www.nothingbutsharepoint.com/sites/eusp/Pages/Use-font-face-in-Rich-Text-Editor-of-SharePoint-2010.aspx 2) You can use custom Markup Styles: http://www.sharepointblues.com/2010/10/27/custom-styles-for-sharepoint-2010-rich-html-field/ ...


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



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