Is it possible to make only a specific part of a string bold in a computed field or text object.
Try a RichText control. It will give you more control over the look of the text.
Related
You can check this screen short image Basically I want to applying different formats on my text, I just want to select a some text area from long string and apply like bold, underline or some other actions perform on selected text.
Here is a way to highlight text.
Spannable spannable = new SpannableString("A test message");
spannable.setSpan(new BackgroundColorSpan(Color.YELLOW), {start_index), {end_index}, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
textView.setText(spannable);
Here is a post that shows you how to make your text selectable and how to get the start and end index.
Get Selected Text from TextView
This is the reference to using spannable and you can use it to figure out the rest of your text changes to the string. There are many options available.
https://developer.android.com/reference/android/text/style/BackgroundColorSpan
Is there a way to change the font color and its background of a rich text field? The goal here is to get a type of color whenever a word is changed from a list.
For instance, I can have a table with two columns, where first column is related to a type of vehicle and the second it is related to type of combustible used. So, let's imagine that every time a vehicle uses gasoline, so its wording should be shown yellow text and the field background in black. On the other hand, if a vehicle uses electrical, its wording should be shown red and the field background in green...
I know that there is a command but I do not know how to use it for more than one value.
#Command([TextSetFontColor]; [Red])
Any help?
You can't change the font and color of the existing text in a rich text field with the Notes #formulas or #commands. There are some tricks you can do (e.g., multiple subforms containing the same field, with different backgrounds and fonts, and a computed subform formula, or maybe with multiple computed-for-display fields and hide-whens - but the text would not be editable that way) before the text is entered into the field. If you want to change the font of already-existing rich text, you'll probably need to use the Notes C or C++ APIs, the MIDAS Rich Text API from Genii software. I think the background will have to be done with computed subforms or hide-whens and computed-for-display fields (for non-editable rich text), no matter what.
I would like to increase width of lotus notes text field on web, I have tried
width="48"
On html tab of the field and put there in style tag but that is not working.
Basically I am having comment field which wherein I would like to increase width of the field so user can see enter long text instead of typing and getting moved.
P.s I know richtext field which can have cols and rows property but I dont need rich text field. I just need simple text field.
Use colon and not an equals sign and add px. So do this instead:
width:48px;
Ok, this is basically what I'm doing right now. I create the raphael text object. I use a click event to open a dialog box. Then I make the changes to the text in the dialog box. This isn't how I wish to implement this though. I want my implementation to be somewhat similar to the way text is created in MS Paint where the user can click on the text object and change the text as they're typing. Does anybody know how to implement this using a raphael text object?
A simple solution would be to create a <textarea> when the user starts editing the text. Fill it with the current text and place it over the text object. Then, when it loses focus (onblur), remove the text area and copy the text back into the text object.
If you really want to edit the text "in place" in the text object, then you can let the user type in a hidden text field. But in this case you'll have to implement all the cursor and selection logic yourself. See this fiddle (which only allows using the right and left arrows to move the cursor, with shift to select text so that you can copy and paste).
Alternately, I don't know if contenteditable works for SVG content, but that would be a very simple solution if it did work.
I need to check if a field is of type "Rich Text" using #Forumla in a View. How can I achieve this?
Alternatively, check the byte size of a field also using #Forumla in a View.
You can turn Rich Text into plain text using the #Abstract formula, and then display that in the view. Unfortunately #Abstract does not work in views.
If views themselves won't get the job done, you can always use an agent to process the documents and set a document item value, which in turn can be shown in a view. It's an extra step but often can get the job done. Using LotusScript you could loop through all the document's items and check if they are a RICHTEXT type, and then stamp the document with an "IsRichText" item set to "Yes", for example.
Formula language will not show these values. The closes you can get is #Length. If it is possible in the design, calculate these values is a separate field using lotus script.