XPages: How to create Dojo widgets within rich text content in a xpage - dojo

I have an xpage that contains a rich text field that uses CKEditor. I have set the toolbar attribute to Full to get the source button so my users can actually create tabs and other items so their content looks good.
I am trying to create a dojo dijit tooltip but it just doens't seem to work. I added the code found on the Dojo web site, but nothing happens.
Am I missing something?
Thanks

I guess it's the htmlFilter/htmlFilterIn property of your richtext control (i.e. field). To add source code "as is" it has to be set to "identity". No guarantee if you can add Dojo widgets directly via the source code though.

Related

Kentico 10 | Toolbar for Rich Text Editor in a Custom Component

I can create a custom toolbar for the EditableText Web Part in Kentico 10, as there is plenty of documentation on how to create/set custom toolbars .. but I can ONLY find documentation for the EditableTextWebPart.
I need to create unique toolbars to be used within several custom Web parts for certain properties / fields. I can't find any documentation on setting them within my own custom Web part, and am hoping someone could point me in the correct direction.
Sounds like you're mixing a few things up. Each webpart has properties. Each property has an associated control. The control you use is based on the datatype of the field.
If you have a long text datatype on your webparts property you should be able to pick the rich text editor as your control. Then create a custom widget for the WYSIWYG editor.
Now if you don't want to work with the WYSIWYG editor then, create your own custom form control.
Check out this article on customizing the WYSIWYG editor. At the end of the article it has a reference to custom widgets for your WYSIWYG editor.
So the answer was under my nose, albeit a bit hidden.
In the /CMS/CMSAdminControls/CKeditor/config.js I added my own custom toolbar, which I had already created, but hand't figured out how to hand it off to the Web part property.
config.toolbar_Caption =
[
['Undo', 'Redo', '-'],
['Cut', 'Copy', 'Paste', 'PasteText', 'Scayt', '-'],
['Bold', '-'],
['InsertLink', 'Unlink', '-'],
['Maximize']
];
The web part has a property, named Caption, with the Data type set to Long text and the Form Comtrol set to Rich Text Editor.
Under Editing control settings, expand Advanced to access Toolbar set and set it to the custom toolbar. In my example, that would be Caption.
Also set the Toolbar location to In so that the toolbar is within the text area vs. floating on top of the entire form.

PDF Markers visible on Document

Is there a way to add a marker on to a PDF that is not contained within the Bookmark panel and visible on the PDF itself. So that our client can just click on the marker to bring him to a specific point in the document. These will be changes that are revisions and not necessarily to do with the structure of the document. I feel like I have seen this in the past but unsure how to go about creating it. Any advisement you may have to offer is greatly appreciated.
I am running AA XI Pro.
Thank you,
You can create floating toolbar using the code below as an example. cExec is the JavaScript expression string to evaluate when the button is clicked. oIcon, which is optional, is a document level icon that you would have previously added to the document using...
this.addIcon("iconName", "iconPath");
You can just run the code to add the icon from the console since you only need to do it once.
Add the code below to a Document JavaScript so that it loads every time the document is opened.
app.addToolButton({
cName: "goToPage",
oIcon: util.iconStreamFromIcon(this.getIcon("LinkIcon")), // Needs to already be a document level Icon object in the document
cExec: "this.pageNum=41",
cTooltext: "Got To Page 42",
cEnable: true,
});
You can add as many buttons as you like but each cName needs to be unique. Also, This will only work in the desktop versions of the Adobe viewers.
You can find a working example of the code above here

Adobe LiveCycle Flowed Form page margins

I am using Adobe LiveCycle Designer ES 8.2 to create a PDF for a survey. I've managed to create the form from scratch using Flowed content boxes to allow the fields to dynamically expand so that I can print out the survey later.
The issue I am having right now though is that if a field is expanded and it pushes other fields below it beyond the page range, it will create a new page consisting of what couldn't fit on the previous page. This is fine, but I would also like the form to automatically move the content below the last page up. Basically, anytime a page is moved into a new page there is a lot of white space and id like the next page to be moved up under the newly positioned fields.
Thank you
You will need to configure the pagination of your Subforms using the Object > Pagination palette. You can also use the Keep With Next/Previous option to control the grouping of the objects on page break. Also make sure that your top level subform is set to Flowed.

Hide few fields in EditForm.asx of Picture Library in sharepoint 2010

I have a picture library and added few fields to it. When i click add new item from picture library, the EditForm.aspx appears after uploading the picture. This form contains many fields of which I want to hide Title, Date Picture Taken, Description, and Keyword. In short the EditForm should contain only Name, Preview and the columns that I have added. Is it possible to hide the other columns? I want to perform this out of the box.
Several possibilities.
You can use SharePoint Designer to manipulate the NewForm, EditForm and DisplayForm. Edit the existing form, use CSS to set the out of the box HTML form to hidden, then add a new custom form to the page and remove the columns you don't want to see.
If you don't want to use these columns at all, just delete them in the Library settings
If you don't want to delete the columns, click the parent content type in the Library settings, then edit each column and set it to "hidden"
Check this out: http://sarangasl.blogspot.in/2009/10/hide-column-in-edit-new-or-display-mode.html
I found this solution to be really simple and effective. Very well documented and descriptive.

Preventing CheckBoxList DataSource from rendering HTML

I am using a CheckBoxList in a VB.NET web project. The elements are pulled from a DataSource which is populated elsewhere in the system.
The problem is, if someone put in some raw HTML, the CheckBoxList seems to render it rather than assume plain text.
In this screenshot, for example, I entered hover here so now whenever you hover over that CheckBox, an alert window pops up. This seems like a potential for XSS and I would like to disable it altogether.
I have tried googling and searching SO for someway to disable HTML rendering such as this, but haven't found anything relevant, so my apologies if this already has been answered elsewhere.
Thanks!
After binding the datasource, you should be able to iterate through each of the Items in the CheckboxList and use System.Web.HttpServerUtility.HtmlEncode to update each item's Text property.