Tab Rich Control: Underline functionality is not working - asp.net

Tab Rich control page is displaying the underline when the user selects and click on 'U' button. But it is not saving the HTML tag for the underline and hence it is not showing the underline when it come back from database..

We need to apply some HTMLExportSettings of HTML Format Provider, so it can generate HTML tag for underline. In order to achieve best compatibility of the generated HTML with Telerik Reporting, you should apply the following settings:
DocumentExportLevel - Fragment;
StylesExportMode - Inline;
StyleRepositoryExportMode - DontExportStyles;
ExportFontStylesAsTags - true.
You can also read complete options of HTML export settings of HTML format provider for generating right HTML..follow the following link ::
http://www.telerik.com/help/silverlight/radrichtextbox-features-import-export-settings.html

Related

GTM - CSS Element

I'm wanting to create a variable to grab the username from a landing page (assuming it's possible). In my attached examples, I'd like to grab the text "Landing_page_test".
I'm just learning CSS so I'm not able to single out just that text.
Any thoughts/suggestions would be much appreciated! enter image description here
Console
Elements Pane of Landing Page
document.querySelector returns an element, not the text. Add .innerText
Try it out on this page: document.querySelector("a.question-hyperlink").innerText to get the name of the question.
But you probably don't want to do it as custom html tag. You probably want to do it on click. in that case, you have {{Clicked Element}} variable in GTM, of which you can also get .innerText, or get its .parentElement and further navigate DOM from the clicked element as you wish and get whatever you need.
Here's the html of the Location & Date/Time text blocks
Text Block

CSS for required fields in Google App Maker

I am currently working on setting up an input form in Google App Maker.
Some of the textboxes require an input and therefore the labels are tagged with an asterisk (*) when drag them to the page, e.g. "Birthday *".
But when I drag the textboxes into a panel in order to rearrange them, the asterisk keeps disappearing. How can make the asterisk appear again?
Why it happens?
Once you drop a form on a page App Maker will add the following CSS classes to form's widgets:
app-FormBody for the inner form panel
required for all input widgets with input required
Also somewhere in App Maker's internals the following CSS rules are defined:
/* Show asterisk only for direct children of 'app-FormBody' panel
marked with 'required' class */
...
.app-FormBody > .app-TextBox.required > .app-TextBox-Label:after,
... {
content: " *";
}
So, when you drop panel inside form body and drag your input inside that inner panel App Maker CSS rules stop working (the widgets are not direct children of app-FormBody anymore).
How to fix it?
you can try to override default App Maker styles
/* Note: there is no '>' selector */
.app-FormBody .app-TextBox.required > .app-TextBox-Label:after {
content: " *";
}
I'm not sure what side effects it can potentially cause...
You can explicitly add asterisk in binding
#models.MyModel.fields.FieldName.displayName + ' *'
Please, also keep in mind that App Maker will not automatically add those hidden styles to the widgets you'll add after form is generated.
The solution below worked for me, although there might be other ways of doing it too.
Please note: If you will use this only in one page, place the css code at the Page style level, otherwise, place it at the Global style level.
CSS:
.customRequired::after {
content: " *";
}
Once you've written the CSS, go to the onAttach event of the TextBox widget and use the following JS:
var elem = widget.getElement();
elem.children[0].classList.add("customRequired");
Additional notes: I tried using the appmaker default css class which is required but it didn't work. Furthermore, I only tested this on the TextBox widget.
Hope it helps!

Label html string being read by screen reader

I've got some dynamically generated html building a drop down menu using the Dojo library. I need to make my code Accessibility compliant and right now the screenreader looks at the menu item and reads it as plain html:
menu.addChild(new MenuItem({
label: "<a onclick=window.location.href='sampleurl.com'
href="sampleurl.com">Sample Link</a> ...
Excuse the onclick, it's for a different issue, but what I'm getting is basically:
Tab down to first menu item
Screenreader: "Less than a onclick equals window dot location dot href equals sampleurl"... etc
I've tried using aria-hidden, but the screen reader just reads that as text, I'm using voice over on Mac OS, but I need it compliant for JAWS as well. Any tips or advice? Thanks!
label is used for the label (which can be in HTML), not for putting the full link html tag.
See on the following page how to use the Dojo library to generate menu items:
https://dojotoolkit.org/reference-guide/1.10/dijit/Menu.html
Example:
menu.addChild(new MenuItem({
label: "Sample Link",
onclick: function() {window.location.href='sampleurl.com';}}));
This would be easier to debug with a working example along with something stating what screen reader / browser combo you are using. At the bare minimum, show us the HTML output of your script, considering it is writing HTML for the screen reader to parse.
That being said, I suspect the missing / inconsistent quotes. Note that you start a string with double quotes, then go into the onclick attribute with no quotes around, then single quotes around its value, and then use double quotes around the href.
Alternatively, you are writing the entire string into the page and somehow HTML encoding it.
I suggest using a linting tool to check your JS.

how can i make a div target of a asp.net hyperlink control

have a page with many links.
when any link is clicked, the page corresponding to that hyperlink should open within a specified area on the same page, that is the "div content"
yes i can use iframe
but can i make a div target of the hyperlink?
please no jscript only html and asp.net
You can use anchors and use it to target your iframe
Google
<iframe name="thisframe" src="http://www.yahoo.com"></iframe>
As far as i know, you can never target *div*s unless you use javascript to manipulate the DOM, though. But if you really REALLY had to use the HyperLink control instead, the you can use the following code instead of using the anchor:
<asp:HyperLink ID="uxHyperLink" runat="server" Target="thisframe" NavigateUrl="http://www.google.com">Google</asp:HyperLink>
<iframe name="thisframe" />
you can use html bookmarks. For an example click on this link
http://www.matlus.com/quartz-for-aspnet/#videos
If will not only take you to a page but scroll your browser down to the "videos" section onthe page.
In the url (the link) notice the /#videos. That is the bookmark. On the target page in question I have an anchor tag with it's name attribute set to "videos"
[a name="videos"][/a]
I'm using square brackets above because of the editor not allowing anchor tags. So basically, just above your "target" div, place an anchor tag and set the "name" attribute. Then you your link simply append the /#anchorname at the end of the url.

How to get value (non html) from ajax html editor

Please help me to get text (non html/ not formatted) from ajax text editor in asp.net i am using vs 2008.
i am using AjaxControlToolkit.HTMLEditor
you can see same kind of at : ajax HtmlEditor
Well, the documentation on the page you linked to only shows that the HTMLEditor has a Content property, which is the html text, not the plain text. However, the editor itself, on the page, allows you to view either the rendered html, or the html code (the markup).
The editor uses an <iframe> to contain the rendered html. If you want to get the plain text (no html tags), you'll have to do it on the clientside. The <iframe> has an id. You could use something like jquery to do this:
var plainText = $("#iframeID body").text();
$("#someHiddenField").val(plainText);
As long as someHiddenField is an <asp:HiddenField> control, it will contain the plain text of the editor when you post back. You just need to make sure you make the above assignment after you're done editing the HTMLEditor's content, but before you actually post back.
UPDATE
I answered another similar question, and my first answer might not actually get the text of the <iframe>. Try this:
var text = $("#iframeID").contents().find("body").text();
$("#ctl00_cpMainContent_Editor1_ctl02_ctl00").contents().find("body")[0].innerHTML

Resources