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


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

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

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

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

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

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


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

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

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

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

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

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

@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

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

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

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

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


1

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.


1

Just create new css file and refer that to default.master page after changing required styles..refer this.. http://virtualizesharepoint.com/2011/06/01/changing-sharepoint-2010-default-font-size/


1

If your textfield looks something like this: <input name="..." type="text" value="Jordan" id="ctl00_m_g_2ff37816_5d5b_42e8_b189_77daaaf2bc56_ff31_ctl00_ctl00_TextField_inplacerte"> Then you can retrieve the value of this input like Kai mentioned with jQuery id selector: ...


1

I believe reusable content list is created at root web only when you enable publishing infrastructure or start with publishing site template. You can use it in all sub sites under site collection. To use it in rich text field of sharepoint site, the publishing features must be enabled at sub sites level too. A similar question is answered here ...


1

It seems that RichHtmlField uses it's own css classes, it has it's own default, and you can change it to your own by adding a prefix to css class name, thus if original class name were for example - RTE-Normal-1, with prefix it will be YourPrefix-Normal-1. You can check class names in page source. To add this property for RichHtmlField you need to edit Page ...


1

<a>, <div> <p> and probably a couple of more tags are supported. To apply styles use inline style approach; for example: <p style="background: blue; color: white;">A style is applied with inline CSS</p>


1

I've always been fond of RightJS's RTE. I admit, I haven't implemented it for use with images, but there is a post on SPServices forum that discusses how to handle file uploading. You should be able to extend the RTE to grab files from desktops instead of URL's and send them to the appropriate library.


1

Try something like this... in the .ASPX (...or .ASCX if you're using a User Control) file: <div><%=this._innerHtml%></div> in the C# code-behind (.ASPX.CS or .ASCX.CS): private string _innerHtml; protected void Page_Load(object sender, EventArgs e) { _innerHtml = oListItem["RichDataHolder"].ToString(); }



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