HtmlEditorExtender does not show Icons - ajaxcontroltoolkit

As the subject says.
I've bound an HtmlEditorExtender to a textbox but it doesn't show the icons in the toolbar, just grey buttons.

The code should look something like:
<asp:TextBox ID="ContentMail" runat="server" AutoFocus="true" Width="60em" Height="40em" TextMode="MultiLine"/>
<asp:HtmlEditorExtender ID="HtmlEditorExtender1" runat="server" TargetControlID="ContentMail" DisplaySourceTab="True">
</asp:HtmlEditorExtender>
And if you are setting it in a TemplateField just add an invisible div with a textbox linked with a HtmlEditorExtender

I've experienced the same with AjaxControltoolkit 15.1, when I applied Ajax Control Toolkit Static Resources. I had to detach ACTStaticRecourses in order to get my icons back in the toolbar.
Hope this helps to some :)

I fixed this bug , I add the css style ajaxcontroltoolkit
https://searchcode.com/codesearch/view/27732040/
to page when problem and change
background: url(Images/html-editor-buttons.png) no-repeat;
in
.ajax__html_editor_extender_button
{
background: url(Images/html-editor-buttons.png) no-repeat;
cursor: pointer;
display: block;
float: left;
border: none;
background-color:#c2c2c2;
padding-bottom:2px;
}
on pathimage then generic ajax

hey guys(girls) if you using update panel in asp.net or asp:HtmlEditorExtender using in gridview and don't show icons. You needed add hide asp.panel when contain asp:HtmlEditorExtender and textbox. Example.
<asp:Panel runat="server" Visible="False">
<asp:TextBox ID="TextBox22" runat="server" AutoFocus="true" BackColor="White" Height="15em" TextMode="MultiLine" Width="99%"></asp:TextBox>
<ajaxToolkit:HtmlEditorExtender ID="TextBox12_HtmlEditorExtender" runat="server" TargetControlID="TextBox22">
</ajaxToolkit:HtmlEditorExtender></asp:Panel>

Related

Flow text around an image in (GitHub) Markdown

I have a narrow long image that I want to display at the top right of a README.md file on GitHub. I have been trying several things to get it aligned right and currently have
<p align="right">
<img src="doc/subpagelist.png" />
</p>
This works in that the image is aligned on the right side, though is rather useless as all content that is below in image in the Markdown file gets displayed under the bottom of the image, rather then to the left of it.
Is there a way to have the text flow around the image (without getting rid of headers and paragraphs)?
The align="right" (or left) attribute works in GitHub Markdown:
<img align="right" src="doc/subpagelist.png">
align="left" works fine. To break the alignment again, use a <br clear="left"/> (or <br clear="right"/>) tag:
<img src="/path/to/image.png" align="left" width="200px"/>
some text floating around the image
<br clear="left"/>
A "newline". This text doesn't float anymore, is left-aligned.
It works for me (only for jekyll, it does not work for Github markdown):
Put the code below in your content markdown (I have put it on the first line for better organization)
<style type="text/css">
.image-left {
display: block;
margin-left: auto;
margin-right: auto;
float: right;
}
</style>
And refers to your image as follows:
[![Proguard](./proguard-snippets.png)](http://www.thiengo.com.br/proguard-android){: .image-left } Your Text comes here...
Note the .image-left class besides the image url.
The final results are here: Movies of the Year jekyll github page
In markdown you can add extra attributes to tags. For instance I use this for what you intend to do:
![Some Title](http://placehold.it/image.jpeg){:style="float: right;margin-right: 7px;margin-top: 7px;"}
What you are describing is "floating" of an image, which allows text to flow around it. There are a number of good turtorials about floating in CSS if you want to learn more about this topic. In the mean time, to get an image to float in Markdown you can wrap the image in a div and float that div using:
<div style="float: right">
![Replace this with your image](http://placehold.it/85x85 "Title")
</div>

Styling the first option of a <select> input on iOS

I'm trying to style a select input on iOS. The first option or initial state should have smaller font-size but not the rest of the options.
I have the following html structure:
<select class="dropdown">
<option selected="" value="Navigation">Navigation</option>
<option value="some-link">Whatever</option>
<option value="some-link">Another option</option>
<option value="some-link">Why</option>
<option value="some-link">What</option>
</select>
My CSS for it looks like this:
select {
-webkit-appearance: none;
font-family: 'Custom-Font', sans-serif;
font-size:.5em
line-height:1.8em; // optical center
background-color: #ccc;
color: #333;
border: none;
padding: 6px 10px 4px 10px;
}
.dropdown {
background-image: url(img/assets.svg);
background-position: right 2px;
background-repeat: no-repeat;
width: 100%;
display:block;
margin-bottom:-1.5em;
option:not(:first-of-type) {
font-size:1.5em;
}
}
The <select> menu looks exactly like I want it to look. It says "Navigation" inside a light-gray box with a rather small font-size.
However when clicking/tapping the select on my iphone the native UI view of iOS shows all options also in a very small font-size.
How can I just make the selected option (or the box itself) use the custom formatting but not the options. I want my options to have a "normal" readable font-size.
Any ideas on that? I tried with option:not(:first-of-type) and increase the font-size but no effect!
Unfortunately, there isn't a way to do it. iOS Safari takes full control of styling select lists' internal contents. Here's a reference for verification: little link.
One way to achieve this this would be to simulate the dropdown/select menu using JavaScript.
It's not very preferable, but if you absolutely require to change the default styling, then I'm afraid it's the only way to go; here's a demo that should give you an idea on how to do the simulation: another little link.
Try this 100% worked for me
select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
For what it's worth - I had a transparent <select> dropdown with a border radius when closed. On iOS (I'm not sure about android, I didn't test it) the default grey box for the <select> would appear inside of my custom border which was unappealing and unwanted.
To get rid of the inner grey box I used the following CSS:
-webkit-appearance: none;
And further more - pertaining to this OP's topic. Bootstrap offers a convenient solution with great documentation to enable custom dropdowns with Javascript. Check it out here.

What is the proper way to align two buttons in the same row with HTMLPanel in GWT 2.4?

I'm using GWT 2.4 and uiBinder to add widgets to a page. Now I want to layout two bottom buttons in one row, but I'm not sure of the correct way to do this.
I tried adding in a horizontalPanel like this:
<tr>
<td align="center">
<g:HorizontalPanel ui:field="horizontalPanel" borderWidth="1" spacing="50">
<g:Button ui:field="cancelButton" text="Cancel"></g:Button>
<g:Button ui:field="exitButton" text="Exit"></g:Button>
</g:HorizontalPanel>
</td>
</tr>
but it's not spacing the buttons far enough apart. Increasing the spacing is adding more height to the panel and pushing everything down away another button that is above it.
What is the proper way to do this?
There are two ways you can go about doing your layout in GWT:
depend on smartgwt or gxt.
bite the bullet and learn css.
I advise people to go the 2nd path. smartgwt and gxt will seem attractive for a simple project. However, as your project gets more and more complex, the incompatibilities with all the other GWT goodies become wider and wider.
Bite the bullet and learn how to integrate css into gwt.
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui">
<ui:style>
.trivial {
font-weight: bold;
margin-left: 50px;
margin-top: 0px;
margin-right: 50px;
margin-bottom: 0px;
}
</ui:style>
<g:HorizontalPanel>
<g:Button styleName="{style.trivial}" ui:field="button1">David Headley</g:Button>
<g:Button styleName="{style.trivial}" ui:field="button2">Debacle</g:Button>
</g:HorizontalPanel>
</ui:UiBinder>

How to show initially hidden DIV with GWT?

I have a DIV tag which I can made either
display: none;
or
visibility: hidden;
Then I want to show it with GWT.
But when I am trying to do
RootPanel.get("myid").setVisible(true);
or
RootPanel.get("myid").setVisible(false);
and it has no effect.
I saw in Firebug, that thess functions add "display: none" or remove it in turn. Since there is one explicit "display: none" hardcoded, the DIV is constantly hidden.
So, how can I accomlish the task? Thanks.
In your JSP
<div id="myid" style="display:none ; width:100%">
In your GWT EntryPoint class
DOM.getElementById("myid").getStyle().setDisplay(Display.BLOCK);

How to make custom share buttons

I have always wanted to add Facebook share buttons to my applications, but the problem that I have is that they all look different. I see sites like this that have custom designed share buttons. Does anybody know a good tutorial, or have any pointers, about how to tackle this?
Sharing something one facebook is quite easy, here is the HTML for my custom share button.
<div id="share_div">
<div id="share">
<a class="click" href="http://www.facebook.com/dialog/feed?app_id={{fbapp_id}}&link={{link_url}}&message={{share_message|urlencode}}&display=popup&redirect_uri={{link_url}}" target="_blank">
Share
</a>
</div>
</div>
Where all the {{variables}} are to be replace by correct value :
fbapp_id is the id of your facebook application.
link_url is a link attached to the shared content (like a link to your site)
and share_message|urlencode is the message that is shared and it needs to be urlencoded.
Also here some css to style this like a real facebook button :
#share {
border:1px solid #0D386F;
background-color:#5D7DAE;
height:24px;
width: 100px;
}
#share a.click {
font-size:13px;
font-weight:bold;
text-align:center;
color:#fff;
border-top:1px solid #879DC2;
background-color:#5D7DAE;
padding: 2px 10px;
cursor: pointer;
text-decoration:none;
width:80px;
display:block;
}
But I let you the pleasure of customizing as you like, the important part being the href of the a tag
Does it answer your question ?