Default PXRichTextEdit to Plain Text - acumatica

When viewing a PXRichTextEdit field in Acumatica, there is a dropdown at the top left of the control to change from Visual to Plain Text. Is there any way to have that control automatically default to the Plain Text option for new records?

I did not find any property to do so.
The only property targeting this menu is AllowSourceMode which can hide the HTML menu item:
<px:PXRichTextEdit ID="edDescription" runat="server" DataField="Description"
AllowSourceMode="False">

Related

Position Action Buttons in Subform

Is there any way I can move action buttons from the main form of the page to a sub form on a page as shown in the following screen shot?
All actions will appear on main toolbar by default. You could hide them from there by using a < px: PXDSCallbackCommand Name="YOURACTIONNAME" Visible="False" CommitChanges="true" >< /px:PXDSCallbackCommand >. Then you could add your action to your Tab/Grid ActionBar. On AR303000-Customers you could see an example on Contacts Tab.

Selected vs Selection in Xpages application layout control

This is SO confusing. I have an Xpage application built with the application layout control. I have 2 Title Bars which each have a navigation element in them with two views each.
I want the selected Title Bar and view to be highlighted. I understand that somehow this involves the Navigation Path and the use of the selected and/or selection properties,, but I do not understand how they work or interact.
Can these answers help you? How do you use the Selected property of the navigator?
You need to set the navigationPath property on each XPage and this must match the selection property (using regex) on the navigation control.
Updated with answer to the comment below
Here's an example XPage for the Home tab and the navigation control for Home:
<xc:layout navigationPath="/Home/XPage1">
<xp:this.facets>
<xc:layout_menu_home xp:key="facetLeft"></xc:layout_menu_home>
<xc:content_xpage1 xp:key="facetMiddle"></xc:content_xpage1>
</xp:this.facets>
</xc:layout>
The layout custom control uses the xe:applicationLayout to control the layout. In this case it has a custom property called navigationPath which is used in the example XPage above. The corresponding navigationPath property of the xe:applicationLayout must be set to this custom property:
<xe:applicationLayout id="applicationLayout">
...
<xe:this.configuration>
<xe:oneuiApplication
navigationPath="${javascript:compositeData.navigationPath}">
Here's part of xe:applicationLayout for handling the two tabs in your layout custom control:
<xe:this.titleBarTabs>
<xe:pageTreeNode page="/xpage1.xsp" label="Home" selection="/Home/.*"></xe:pageTreeNode>
<xe:pageTreeNode page="/xpage3.xsp" label="Tips" selection="/Tips/.*"></xe:pageTreeNode>
</xe:this.titleBarTabs>
Here's an example navigation control for Home:
<xe:navigator id="navigator1" >
<xe:this.treeNodes>
<xe:pageTreeNode page="/xpage1.xsp" label="XPage 1" selection="/Home/XPage1"></xe:pageTreeNode>
<xe:pageTreeNode page="/xpage2.xsp" label="XPage 2" selection="/Home/XPage2"></xe:pageTreeNode>
</xe:this.treeNodes>
</xe:navigator>

Enhanced Rich Text field showing div and p tags

I have a collect task in Sharepoint 2010 with a Enhanced Rich Text box. In the list it shows the p and div tags.
<div class="ExternalClass1458740DC98941C3A3589359A3017AAA"><p>Approved - Rev D​</p></div>
This is the field where the text is coming from.
<td width="75%" class="ms-formbody" >
<SharePoint:FormField runat="server" id="ff3{$Pos}" ControlMode="Edit" FieldName="DocCtlAdmin_x0020_Comment1234567" __designer:bind="{ddwrt:DataBind('u',concat('ff3',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)) , '#DocCtlAdmin_x0020_Comment1234567')}"/>
<SharePoint:FieldDescription runat="server" id="ff3description{$Pos}" FieldName="DocCtlAdmin_x0020_Comment1234567" ControlMode="Edit"/>
</td>
Any insight as to why or how to remove would be appreciated
Simple answer is: In your display view add disable-output-escaping="yes" to your XSL statement like so:
xsl:value-of select="#CMImplPlan" disable-output-escaping="yes"
This will remove character output escaping for HTML characters.
Issue is you are using RichHTMLField to get the input from your end users for this field. So sharepoint adds some HTML tag.
but
when you are displaying you are using FormField, which is text based, so it shows all the HTML tags also.
So solution is :
1. Use RichHTMLField for both input and display
2. Use FormField/ Simple textbox for both input and display
3. Write a custom control / control extender to clean all the HTML before outputting it
4. Also a less recommended solution will be to search this tags on page via jQuery and remove them.

How to set <aui:button> icon in Liferay without using Javascript?

I'm trying to set icon to <aui:button> like on this tutorial.
But solution described there doesn't work well in my case, because I have a table and on each row I have a button with different resourceUrl. Like this:
<portlet:resourceURL id="saveReport" var="saveReportURL">
<portlet:param name="reportId" value="${report.reportId}" />
</portlet:resourceURL>
<aui:button onclick="location.href = '${saveReportURL}'">
Is it possible to set icon in <aui:button> without using JavaScript as described in tutorial?
Thanks
You can write this below code for setting icon in liferay alloy button
<aui:button type="cancel" cssClass="btn-info" icon="icon-upload-alt" iconAlign="right" value="upload" />
you need to use the icon attribute for this setting "Icon glyphs"
you need to use cssClass for adding extra design button class for the designing
you need to set iconAlign attribute for left or right side of the button text value
You should be able to add an icon to a button without using JavaScript by adding one of these Icon CSS classes to your button. For example, if you wanted to create a button with a calendar icon, your code should look something like this:
<aui:button class="icon-calendar" ... />

Sharepoint 2007 - custom context menu for certain file types

I was wondering if someone could help me out with Sharepoint 2007. What I want to do is to add a custom menu item to a context menu (the menu that opens when you click a document or another item).
Right now, the menu looks like this:
picture
I want to add an item, "Do stuff" for example, to this menu. Major problems:
I wish this item to appear only in menus for a certain file type (e.g. only for .html but not for .doc);
When I click this item ("Do stuff"), I want to call custom external code (written in C#, either an exe or a DLL), which accepts the name of the clicked file as an input parameter.
I understand the way to achieve this is by using Custom Actions (no javascript editing required in 2007, right?). But since I'm quite new to MOSS, I'm a bit lost and not sure what exactly to do and where to start, so any help is greatly appreciated.
You have to implement a CustomAction like this:
<CustomAction
Id="YourUniqueId"
Location="EditControlBlock"
RegistrationType="FileType"
RegistrationId="html"
Sequence="20"
Title="The text you want">
<UrlAction Url="~site/_layouts/company/ActionPage.aspx?List={ListId}&ID={ItemId}" />
</CustomAction>
What you put in the Url of UrlAction depends on what you want to do. It can be JavaScript or the url of a Page or Handler.
In my example it's a Page which gets the QueryParameters so that SPContext.Current.ListItem will contain the selected documents listitem.
<?xml version="1.0" encoding="utf-8"?>
<Elements Id="d0574a32-59ce-4561-9496-ccf17da37a35" xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction Id="Test2"
Location="EditControlBlock"
RegistrationType="FileType"
//docx = documents, txt = text files, html = html files**
RegistrationId="docx" Sequence="10"
Title="View Item Properties">
<UrlAction Url="~site/_layouts/WSSHOL/ViewPageRedirect.aspx?listid={ListId}&itemid={ItemId}" />
</CustomAction>
</Elements>

Resources