Tag Info

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


3

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


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

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

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

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


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

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

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


1

This can happen if you copy and paste text into the Content Editor Web Part. I could not tell you why but sometimes when you do this it will create new web part ID's in the Source Code. I would recommend checking the Source of the content editor web part for any additional ID's added to DIV's. You should be able to remove those to stop the javascript errors. ...


1

The "PublishingWebControls:RichHtmlField" control is capable of rendering field data, not web parts -- I think this is where the confusion is coming from. In my experience, the data coming from code-behind vs. declarative have been the same.


1

Instead of using PublishingWebControls:RichHtmlField, can't you use SharePoint:InputFormTextBox It is a replacement of multi-line Rich Text Box, and it doesn't require Ribbon! And I guess you should be easily able to set focus on this textbox... document.getElementById('<%= myInputFormTextBox.ClientID %>').focus(); Or if that doesn't works, you can ...



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