Hot answers tagged

7

Weird, I had this exact same problem yesterday, with the exact same Ribbon command! You basically need to copy the position styles from corev4 into your custom CSS stylesheet, and replace "ms-rte" with whatever you put in the PrefixStyleSheet property. EDIT: Hint - take a vanilla RTE control (remove the PrefixStyleSheet attribute), add an image, position ...


4

SharePoint rich text fields support copy & paste by using an iframe dynamically inserted into the body tag. Manipulating this iframe or any of its content may cause error 800a025e thrown by SP.UI.RTE.debug.js. Searching through SP.UI.RTE.debug.js for "pasteDiv" should help you debugging this issue, as the inserted iframe contains a DIV with id ...


4

Not really but it depends on for what you want to use it. I have used in the past the Telerik RAD Editor in a large environment (>10.000 Users) http://sharepoint.telerik.com/aspnet-ajax/web-parts/Pages/Content-Editor-Web-Part-using-RadEditor.aspx This is the most popular SharePoint HTML Editor on the market. But the users where also not happy with it. The ...


3

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


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


2

How did you try to override the JavaScript? (I'm writing this because HasInitialFocus hasn't worked and is the obvious answer, although maybe could set it on another field, the first field instead as true?) I would add and try this: $('document').Ready(function() { $('#someother_element').focus(); }); This should work.. Otherwise run up Chrome, and ...


2

I found a property named AllowInitialFocus on BaseFieldControl which RichHtmlField is derived from (couple of levels down). It's protected virtual and always return true according to MSDN documentation. I had to override the control to make it return false but it seems to do nothing :( Only solution I can think of is override the JavaScript setting the ...


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

Use another CSS selector, such as div[class*="sbgElement-Bump"]:first-of-type.


2

Apparently it was far easier than I expected... item.FieldValuesAsText[FIELD_NAME] instead of item[FIELD_NAME] So... string businessCase = item["Business_x0020_Case"] != null ? item.FieldValuesAsText["Business_x0020_Case"] : string.Empty;


2

Sorry for replying with answer after long time. I wondered when I saw there is no answer to this question. So decided to do self-reply to this question. After lots of brain storming I get to know there was silly mistake I did in feature receiver. When I debug application I come to know that I was getting null values from site column properties. Then I placed ...


2

I created a little script to put focus where I wanted it on opening a publishing page in edit mode. The code is: function waitUnitStuffIsLoaded() {setTimeout(function(){refocus()},1000);} function refocus(){$("input[Title='Title']").focus();} SP.SOD.executeOrDelayUntilScriptLoaded(waitUnitStuffIsLoaded, "sp.ui.spellcheck.js"); ...


2

You need to render the rich text. Just add STSHtmlDecode like in this example. <div id="trimmedDetailsDiv" class="newsListItemBody" style="padding-right: 0px; color:#656565; font-size:15px; padding-bottom: 25px;"> _#= STSHtmlDecode(shortDescription.value) =#_ </div> SharePoint 2013 - Working with Display Template for Content Search Web ...


2

Used PowerShell to create my columns the way I wanted. Add-PSSnapIn "Microsoft.SharePoint.Powershell" #Get the site collection and web object $siteColl = Get-SPSite -Identity "http://sitecollectionURL.com" $rootWeb = $siteColl.RootWeb #Assign fieldXMLString variable with field XML for site column $fieldXMLString = '<Field Type="HTML" ...


2

Try <div><img src="image.jpg" /></div>


1

It turned out to be a Content Type caching issue... Apparently SharePoint remembered the version of it when it was not fully developed. Creating a new Site Collection resolved the issue.


1

Try alert($('#linkMainImgDiv').html()) First check in you page source that even this id exist or not. If exist then try it in your debugger tool of browser. Can you share your markup or any screenshot with div.


1

as far as I know, site columns are wysiwyg (what you see is what you get). you have to choose whatever type you need from a limited list of types, and apply the avaible customization options. the easiest way to avoid problems is to set the column as single line of text (in which case you could set the maxlength upfront or use a formula in the list ...


1

A little bit of history. We wanted to lock down how users create content. So our goal was to disable the font family, font size and font color controls. I always thought the key was to configure the RichHtmlField. It worked for page content, becuase the control was in a page layout. But for list items, there is/was no page layout for the RichHtmlField to ...


1

Webparts in the masterpage are not configurable, meaning that you can indeed add a Content Editor WebPart to your masterpage, but it won't be editable from the browser, as you would like. What you can do is adding a Xslt list view web part and retrieving fixed content from a list. For example, you can configure the CAML query to retrieve the first item (or ...


1

Follow the website structure with site collections and sites depending on the security levels you require. Work out what needs to be a managed path and what needs to be a site. Look for the closest OOTB webpart for functionality if not look on codeplex most already exist. Design your security groups with the site structure in mind, and think about a ...


1

Check out Chris' Obrien's blog post for adding items to an existing group. http://www.sharepointnutsandbolts.com/2010/01/adding-ribbon-items-into-existing.html


1

You could probably first decode the string from html, then trim it and then reencode it to html, like this: var aString = yourTextBoxText; aString= SPEncode.HtmlDecode(aString); Since the texbox will always render <html><div> before the content you can not use .Trim(), instead use: aString = aString.Replace("<html> <div>", ""); ...


1

Try adding the html element works for me. <PublishingWebControls:RichHtmlField FieldName="PublishingPageContent" runat="server" PopupEditorMode="True" html="<span><p>This will be displayed on every page you create</p></span>" />


1

Did you create a new content type for your page layout? The "PublishingWebControls:RichHtmlField" control is always associated with a field in your related content type with a data type of PublishingHTML. You will need to get the guid of the new field and associate it with the RichHtmlField in the page layout markup before it will show the content of the ...


1

So what's propably happened is that you've got the HTMLField within your EditMode Panel as below <PublishingWebControls:EditModePanel> <PublishingWebControls:RichHtmlField id="PageContent" FieldName="PublishingPageContent" runat="server" CssClass="bp-pagelayout-contenttable-maxwidth"/> ...


1

This works fine for us: <PublishingWebControls:RichHtmlField FieldName="PublishingPageContent" runat="server" PopupEditorMode="True"/> Allows editing and displays content.


1

You should create bindings to your custom content type: create empty element, add bindings like this to your element file: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <!--Default content type--> <ContentTypeBinding ...


1

Insert this at the bottom of your masterpage before the </body> end tag: <script type="text/javascript"> $(document).ready(function () { $("div[RteRedirect]").each(function () { var id = $(this).attr("RteRedirect"); editSettings = $("#" + id); if (editSettings.length > 0 && ...


1

If you simply have location as city then you can have a list for location information. If you are talking about having Latitude, Longitude coordinates then you can associate each page with those fields. Depends what you are trying to do. If you just have cities as a choice field on page then you can have a list for city specific information and you can ...



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