How do I display special character in Fiori UI5 - sapui5

I am trying to display special characters like Circumflex (&Ecirc) or Acute (&‌Vacute) in UI5 Fiori. I am not using index.html but I am using component.js. All the answers to this question insert
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
into index.html but I don't have index.html. So how will I do it with component.js?
I have tried using uriencode but that didn't work.
For example I have card control and I want to escape the text in the card header.
Here is the code:
<f:Card>
<f:header>
<card:Header id="header" title="value"/>
</f:header>
I am trying to escape the title for card with header id.

mhm.. you can use it anywhere.. so you just have to add the html code for the character you can look for example here: https://www.starr.net/is/type/htmlcodes.html
you put the character code where you want it to have

Related

Webapp homescreen title suggestion and jquery mobile

When user chooses "add to homescreen" option from mobile Safari she sees a dialog where she can enter title for that shortcut. The text field is already filled with some default title.
The question is: there this title is taken from?
In my code I have following header for one of my pages (all pages in single html file):
<div data-role="header" class="toolbar">
<h1 id="someHeader" class="exampleHeader">Example Header</h1>
Other
</div>
I'm changing this title dynamically by using
var someDifferentTitle = ...
$('.exampleHeader').html(someDifferentTitle).trigger('create');
The title updates just fine but when I tap "add to homescreen" the system still uses original "Example Header" hint!
How to fix this? Any ideas?
Answer here: https://stackoverflow.com/a/11569043/275754
Short answer:
<meta name="apple-mobile-web-app-title" content="Short name">
OK, it turned out to be very simple, one just needs to change document's title:
document.title = someDifferentTitle
I still have no idea why the hint is truncated after several characters, but that is kind of enough for me.
I think however that there is slight inconsistency in jQM implementation. If setting toolbar's header in h1 using code changes the document title then dynamic change of header via .html() method should change the title as well.

Using CSS tricks full width on mobile phones

Is there anyway to apply this method from Chris Coyier to mobile phones: http://css-tricks.com/full-browser-width-bars/
I applied
html {overflow-x: hidden;}
To get rid of the horizontal scrollbar, but when viewing on an iphone for instance. There is a horizontal scrollbar.
You can view the site here: http://www.revival.tv/turningpoint/
Try adding <meta name="viewport" content="width=device-width" /> within the head tag of your page.
Try adding it to the body tag, too.
body {overflow-x: hidden;}
Find the the thing that's causing the scrollbar and get rid of it. Hiding overflow-x seems a bit of a sticking plaster to me - if you do it right in the first place you shouldn't need this. Using media queries allow you to set the width of the page at difference screen sizes. This means you can pretty much wrap you content in div and set its width at the different screen sizes
I am finding that the initial-scale attribute is crashing Safari for a web page that contains an embedded Google Map. http://w.pat.tc
Use this code
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
Thats usefull for my moblie web http://www.sepatuonline-murah.com

What do meta-if tags in Tumblr do?

The example Tumblr gives is
<html>
<head>
<!-- DEFAULTS -->
<meta name="if:Show people I follow" content="1"/>
<meta name="if:Reverse pagination" content="0"/>
</head>
<body>
{block:IfNotReversePagination}
Previous Next
{/block:IfNotReversePagination}
{block:IfReversePagination}
Next Previous
{/block:IfReversePagination}
{block:IfShowPeopleIFollow}
<div id="following">...</div>
{/block:IfShowPeopleIFollow}
</body>
</html>
For these meta-if tags, when I change content="1" to content="0" or content="" nothing seems to happen to the appearance of my tumblr.
I don't understand what these meta-if tags do.
According to Tumblr: By including the special meta-if tags in your theme, users can easily toggle options you define. This is useful for showing or hiding different widgets or design elements.
I understood this as you can show/hide different design elements by changing the content value ie. content="0", content="1", content="". But nothing seems to happen to the design if I do this.
I googled this and I can't find any explanation elaborating on what Tumblr says. Can someone please explain?
Tumblr uses meta tags to save preferences of the theme. Meta if will cause that user gets a new checkbox on the Appearance menu. If its checked than the
<div id="following">...</div>
will be shown on your page.
So there should be new div element in the page source and three dots displayed on the page.
What Bojan Dević said is correct. Although, I would like to address the other half of your question, as well. content="1" automatically sets the element to be shown, or as content="0" makes it hidden.

Specifying desktop text for Apple iPhone apple touch icon HTML attribute

The HTML tag :
<link rel="apple-touch-icon" href="/customIcon.png"/>
seems to picks up the text it will use from the first 12 characters of the HTML tag:
<title>123456789012...</title>
when you select the 'Add to Home' option in the Safari browser. However only the first 9 character are displayed in the iPhone's desktop. If more than 9 are in the text dialog box, the result is a '...' name on the desktop of the iPhone. The <title> tag often has more than 9 or 12 characters to name the web page.
Is there a way to keep the web page's <title> attribute intact and long while specifying a 9 character name of the desktop icon on the iPhone?
I have tried the:
title="12345689" attribute in the <link rel> attribute with no luck.
Thanks in advance!
You can't increase the number of characters shown under the icon but you can get it to default to something other than whats in the <title> of the page with this meta tag.
<meta name="apple-mobile-web-app-title" content="New Title">
I think this may only have support from iOS 6 up though.
No, there is no way you can lengthen the title on the homescreen. However, native iOS Apps cannot do this either if it's any consolation.

tiny mce valid elements end tag

I have a custom tag like this:
<content name="Home" />
When I click the Html button of the TinyMCE it was replaced with
<content name="Home"></content>
Currently my settings are: valid_elements: "content[name]"
What should I put in the valid_elements variable so that the tag will will be:
<content name="Home" />?
I am not perfectly sure, but i think this issue is not to be solved easily.
I do not think that you can configure this behavior because it is browser related and not tinies fault. Looks like the browser treats your custom html element like an html element with an opening and a closing part on default, even though you want to have a single part html element like a br-tag. The only way - i see - is to get the browser to accept your custom thlm elment as one part html element, which i do not know how to do.