How to check the value of Rich Text Field in content of IBM WCM is empty - wcm

We have IBM WCM 8.5, and created content which contains Rich Text component in AT field.
I want to check whether the value of Rich Text is empty or not in one of my Menu Component.
I have tried to use "IfEmpty Plugin Component", but it doesn't work.
If any one have solution to this, it is of great help to me.

I have tried using Plugin:ifEmpty in WebSphere Portal 8.5 and they worked fine with Rich Text Editors.
This was the code that I used in the presentation template:-
[Plugin:ifEmpty value="[Element context='current' type='content' key='richText']"]Empty![/Plugin:ifEmpty]
[Plugin:ifNotEmpty value="[Element context='current' type='content' key='richText']"]Not Empty![/Plugin:ifNotEmpty]
It worked pretty well and responded appropriately.
May be you need to update to the latest fix pack. The other possibility would be that you inadvertently put some value in the rich text editor in the authoring template and all contents created from it took this value. Check the source of the rich text editor to make sure that it is empty.

This is known issue in the Textbox.io editor which comes with IBM Portal 8.5. When its empty it gives the '<p> </p>'
tags. We are facing the same issue. We are using Portal 8.5 CF 11

Related

How to add hover texts to Vaadin components?

How can I add a hover-text (i.e. a text box containing some explanation or details appearing when I hover with the mouse over a component) to TextFields, Tabs, Links, Labels, etc.
I googled and scanned the "Book of Vaadin" as well as "Building Modern Web Apps ..." books and neither contains any relevant info on hover-texts.
Have I missed something? Or are they known under some different term?
For example you can add a title:
yourComponent.getElement().setAttribute("title", "Your Explanation");
Read more about the title attribute in the docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title
If the native title attribute is not enough, you can look into add-ons. The Vaadin Directory has a Tooltips4Vaadin, or Tooltip. The second one is CVAL 3.0 licensed, but I believe it should be Apache 2.0. At least the corresponding web component is Apache 2.0.

How to retain simple TFS check-in comment formatting when entered in VS2015

Is it possible to retain simple formatting like newlines in a TFS check-in comment entered in VS2015 but viewed using the web interface?
For example, in VS2015 I enter:
Fixed yadda, yadda, yadda:
- added validation to check for X
- added confirmation dialog to ask User if the want to continue despite X
- etc
But in the TFS web interface, it displays as:
Fixed yadda, yadda, yadda: - added validation to check for X - added confirmation dialog to ask User if the want to continue despite X - etc
And the longer the comment, the bigger the unbroken blob of text in the web interface.
If you enter the same formatted comment in the web interface instead of VS, it retains the formatting.
I know it has to do with HTML vs text and the \n in the text provided by VS isn't converted to an HTML linebreak(or whatever it uses) in the web interface, but is there anything that can be done?
Thanks.
Edit
I'm entering this comment into the field on the Pending Changes window, not the full page Task window.
Also, using TFS 2013.
I tested with my TFS2015.3 + VS2015.3, the format of check-in comment is the same as in VS. Check the screenshot below:
Adding a screenshot:

MVC 5 With Tinymce Editor Contain Words "FIND", "SERVICES" and some more around 8 more letter "ERR_CONNECTION_RESET"

recently i am facing problem on my all MVC applications using TinyMce editor i am using that editor to allow users to input content of the page, strange things is happening now. when ever they have type following word in content.
"find", "services","replace" and some 8 more character inside editor, and when we hit safe button immediately after server giving me following error.
This webpage is not available
ERR_CONNECTION_RESET
as far for me this is Firewall problem. but i need to know if someone have same problem how can we explain network people?
The error clearly indicates as you mentioned that this is an internet problem as it suggests webpage is not available. There is a video here that indicates you may need to reset somethings on your network. Checkout if that helps.

Why does my control (component) disappear when I set the 'control name' to "test-controlenummer" in Orbeon Form Builder?

I'm building a form in the Orbeon Form Builder. The simplest way to recreate this problem is as follows:
Put a control on the form.
Give it any label, it does not matter.
Go to 'control details'.
Change the 'Control Name' to 'test-controlenummer'.
Confirm with the 'apply' button.
See the control itself disappear
Notice that the question mark of the help feature does not disappear, nor do the delete and validation options once you hover over the formerly-visible-component. The grid cell also acts as if it was occupied. The control simply does not show and some of the changes to the name and/or validation options result in XPath expression errors.
I have taken a quick look at the underlying xml code, however at first glance I did not find anything out of the ordinary.
It disappears because of a bug in Orbeon Forms 3.9 when control names contain a dash. Like you said, there is nothing wrong with the markup Form Builder generates, but it then incorrectly just doesn't expect a dash to be present in the control name.
This bug has been fixed in the latest code, so it won't be present in the next release.
If you are using Orbeon Forms PE, I recommend you contact Orbeon to see if you can get a patch for this (either through Basecamp if you already have a support account setup, or by email, info AT orbeon.com).
If you are using Orbeon Forms CE, for now, you can work around this issue by avoiding dashes in the names of your controls.

Google Chrome Extension: Print the page silently

I'm developing an internal Google Chrome Extension that needs a way to initiate print the current page to the printer. I do not want the default Print dialog to come up (so, javascript:window.print() is out of question).
As far as I understand, this is not possible just with the JS + HTML plug-in, so I'm also open to using the NPAPI plugin also (with a dummy mime-type). And I'm concerned for Windows platform only.
I'm also open for various hacks / workarounds if possible, though a standard solution would be nice.
If you think this is not possible, let me know if you know any feature request logged for it?
Any suggestions/clarifications are welcome..
In chrome (v18+) we have the --kiosk --kiosk-printing switches. One can print automatically to default printer without print confirmation.
You can see it from this video http://www.youtube.com/watch?v=D6UHjuvI7IE
Since NPAPI allows you to create native C++ plugins that you can interact with through an object tag (which you can use from an extension), that would probably be the way to do it.
The tricky bit is that I don't know of a good way to get the bits for printing the page. The only person I know of who has done something similar to this actually got the window handle for the browser (available through NPAPI) and scraped the bits off of it to print that way, but that won't take into account print stylesheets or anything. You could also try using automation events to try to control the print dialog, but I have no idea if that would work or not.
By design, the browsers try not to let you do something like this, as it could open some serious vulnerabilities if any website could just start printing things to your printer without confirmation...
Anyway, if you find a way to do it with C++ you can use FireBreath to ease the creation of the NPAPI plugin.
There are various extensions that take snapshots of the current web page (for example, this one); you could adapt one to send the image to a printer via an NPAPI plugin.
I've recently been looking for a similar ability, and it seems like it would be quite possible using Chrome's new native messaging api.
https://developer.chrome.com/extensions/nativeMessaging
There are plenty of examples of this with C#, but here is one quick example of troubleshooting Chrome native messaging with a basic C# application
Native messaging from chrome extension to native host written in C#
I realize this may be a day late and a dollar short, but in case anyone else comes across this question, this is the solution that worked for me. From inside a C# app, you can directly print to installed printers using the PrintDocument class. If you figured out a way to get the page image, this would be far easier than using firebreath or NPAPI.
Disable print preview in Google Chrome on Mac
Quit Google Chrome
Launch Terminal on your Mac. (Search “Terminal” using the Search box)
Type defaults write com.google.Chrome DisablePrintPreview -bool true
Close Terminal and open Google Chrome
Disable print preview in Google Chrome on Windows
Close Google Chrome
From your desktop, right click Google Chrome
Click Properties
In the dialog box, add ‘ –disable-print-preview‘ at the end of the Target field sans the apostrophe (make sure to include the space before –)
Click Apply
Disable print preview in Firefox on Mac
In the address bar type “about:config” and press Enter.
Right click on the page, hover over ‘New’ and click on ‘Boolean’
Type ‘print.always_print_silent’ as the preference name and click ‘OK’
Click on ‘true’ and click ‘OK’.
Close the about:config window.
Disable print preview in Firefox on Windows
In the address bar type “about:config” and press Enter.
Right click on the page, hover over ‘New’ and click on ‘Boolean’ Type
‘print.always_print_silent‘ as the preference name and click ‘OK’
Click on ‘true’ and click ‘OK’.
Close the about:config window.
https://support.dryfta.com/how-to-disable-print-preview-in-chrome-firefox-on-windows-mac/

Resources