Kentico13 - How to add content teasers in richtext field? - kentico

We are using Kentico XP 13.0.44. Our content editors create news articles with rich text fields in built-in CKEditor v4.14.
Our editors ask for a feature to insert content teasers into rich-text. My idea was to create a custom CKEditor plugin and utilize Kentico's "Insert Link" dialog (editor.config.LinkDialogURL).
This works, but ideally I would like to hide all tabs except "Content". I tried to add query parameters like &anchor_hide=1&email_hide=1&libraries_hide=1&web_hide=1 to the "/CMSFormControls/Selectors/InsertImageOrMedia" LinkDialogURL but that doesn't work.
Is there a way to somehow customize this dialog or create custom dialogs for CKEditor? Am I on the wrong track and is there a better solution?

Related

Edit Text in SharePoint Form?

Im new to SharePoint and have been asked to update some text on a form in SharePoint. I can’t figure out how to select and make the changes. When I select the web part that contains the form textboxes, buttons etc, there does not seem to be a way to select and edit the text. Anyone have any suggestions as to what I should try?
You can connect to your SharePoint site using SharePoint designer and do all the customization needed there.
Or you can add a content editor web part and inside its content just add a <script> tag and add some JavaScript that get the label you want to change and edit its content

How can I add a button to Request Tracker GUI that triggers a custom action?

I'm working with Request Tracker and I would like to add a button when you visualize an open ticket that triggers a POST call to an external Java Server and it returns a PDF file with a report about the ticket. What is the best workaround?
There are many different ways to add this sort of customization. The easiest might be to write some Javascript to add the button by looking at the divs and ids RT writes to the ticket display page. You can drop the Javascript right in the styling box on the Theme Editor page.
If you can request the PDF via GET, you can just add a link in the Links section. Or, depending on what you're trying to do, you can also do dynamic things with custom field values as described in the External Custom Field docs.

How to display and work with tabbed table in XPages?

I have database where all documents were created by Lotus Notes client. Documents contain Rich text field with tabbed tables with text and attachments on every tab.
Now I want to show documents with XPages. But tabbed tables are not visible in XPages.
How can I display Rich text field with tabbed table in XPages?
The answer isn't as straight forwarded as you would like and involved some wizardry. There are several moving parts. The first is the quality of the RTF-HTML conversion. I superstrongly suggest you give Ben a call. In case he doesn't handle tabbed tables (which are a beast), these are the steps to get a solution (I hope the force Javascript is strong with you):
Familiarize yourself with the Table handling and rendering. To do so, open the RichText field on its own in the browser. The trick is the ?OpenField command as documented by Carl.
In that HTML you can click on the various tabs to show that content, look at the URL and the source to learn about the exact syntax (which AFAIK isn't documented - or the documentation is well hidden)
By now you should have an idea how to identify a tabbed table by its HTML markup. Try to construct a Dojo selector or a JQuery (whatever is your poison).
Now show your page without the RichText field, but place a placeholder <div id="RTPlaceholder" /> where you want to show your content (or place a dijit panel there).
Use an Ajax call to ?OpenField to get the content. With your query expression you check for tabbed tables - if none there, just render the content
If you found a tabbed table, you construct a dijit tabbed table (or a UI framework of your choice equivalent) and make one call per tab to fill them. Some clever queries are needed (you don't want the surrounding table, but only tab-label and content).
That's the general direction. So Step 1: a little chat with Ben. As usual the devil is in the details, so you need to be brave.
Memento bene:
RichText > HTML => false;
HTML > RichText => false;
HMTL != RichText => true;
Let us know how it goes!

Converting richtext to MIME / HTML?

I have a old Notes Database that was designed with tradtional Notes forms for both the client and the web.
I still want to keep the old database in the traditonal Notes client. But display the rich text as HTML in xpages.
I selected the Store contents as HTML and MIME on the rich text field on the form but when I do, it destroys all of the formatting and removes things like collapsable sections. But it does allow the content to be displayed even though it is not pretty.
I found this thread:
XPages RichText Links
Where Steve recommends using that option.
He goes on with a further solution that I am not sure I understand it at all.
We have lots and lots of content, so asking the users to redo it all manaully is not an option. Is there anyway we can either just display this rich text content or at least convert it while keeping all of the formatting and collapsible sections?
When you check that option you destroy the existing content formatting if you don't convert the content. The conversion is not perfect and is what the RichText control does on the fly.
The set of actions you want to take:
get the coexedit plugin or the
add a new RT field with the MIME
run an agent to
optional: remove the old field and rename the new to the old name (make sure mime stays checked)
For read only access (both options get better with the coexedit plugin) :
use the RichText control, no further action is required
use a Dojo panel. It has a href property you point to ... Body?OpenField, no further action is required
Note:the later doesn't work in XPiNC

Default content editor in list form doesn't allow image alignment

I need to be able to adjust the alignment of an image in an "Enhanced Rich Text Field" in an announcements list in MOSS 2007. However, the default content editor in the edit form for the list doesn't provide a way to do that. What's the fastest way for me to make sure users can align images? My first thought was to customize the DispForm.aspx and EditForm.aspx pages, but they just have the ListForm web part in the content region and as far as I know, you can't customize the ListForm web part from the designer.
You can't customize the LisForm web part, but you can add a "custom list form" to create a custom edit form. Maybe you haven't seen this article: http://weblogs.asp.net/jan/archive/2006/11/06/Custom-Edit-Forms-for-SharePoint-2007-Lists.aspx
Then you could do some javascript hackery to insert your own button which then calls something similar to existing RTE_InsertImage function to call a pop-up window and do whatever you need (you'll find this function in 12\template\layouts\1033\form.js)
I fail to see (or understand) your issue. I created a new announcements list, created a new item, inserted an image, aligned it to the right, viewed the item and it worked.
Then I proceeded to create a new custom column, choose multiple lines,enhanced rich text field, edited my list item, added an image, centered it, viewed and it was also working.
The only thing I noticed is that the "rich" control does not appears on non-IE browsers.

Resources