AJAX :: Creating A Custom Styles Select Button For HTMLEditor?
Apr 30, 2010
I have been trying to create a custom Styles select button for the HTMLEditor control based on the examples given in the CustomButtonsAndPopups.cs and CustomEditor.cs files. I have had some success: The select button is displayed and the functionality of selecting a style (eg. H1, H2, P etc) and changing the style of selected text works but there are two problems that make it different from the Font Name select button: There is no label next to the button and there is no default text:
The style button is on the left. The Font Name select button is on the right
how to add the label and the default option?
Here is my version of the CustomButtonsAndPopups.cs file:
What is the correct code to append text to the END of the content inside the HTMLEditor in design mode with a button click?In this case,there will be no cursor position set,hence the value will be 0, and the text is inserted at the beginning of the html within the HTMLEditor.This is what I am using to insert the text where the cursor is:
I have a Results.aspx page that displays the resulting records queried using a SqlDataSource object via a ListView. I want to add a "View" button that will appear next to each record, and when clicked will take me to a separate page that will display details about that record. How do I accomplish this?
I have tried what you said, citronas and here's what I've come up with:
Unfortunately nothing actually happens...am I missing something?
Edit -- Fixed
I was missing something! I had CommandName equal to my method name instead of OnCommand. I took out CommandName, kept the argument bit and replaced CommandName with OnCommand. Everything works now, but what would I ever need CommandName for?
I have created a menu in ASP.net 4.0 which is is rendered as UL/LI
However I am frustrated with ASP as it produces unwanted style e.g. style="position: relative; width: auto; float: left;" in the UL tag according to firebug. I would really like it to render without this.
A second question is the output in firebug is not the same as if I look at the page source i.e. the style="..." is not in the UL? Is Firebug wrong...can it be trusted?
I have the following list of fonts:I have no issues with using them vianew Font("XXXX Sans", 21, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel)However, what do i do when i need to use a non-standard font style like light? All that is provided is an enumeration and that is not suitable.
I've been trying to find a solution to compiling css and images into the dll file for distribution, but I haven't found anything good about it. The reason is pretty simple:
1. If the user doesn't use styles, it'll look like...manure ;)
2. If they don't use images, the shadowing effects will be gone
I will add features for changing the styles, but I would like to have a fall-back. If you don't have any ideas about the css, I can write it directly in style attributes instead of using classes, but classes are preferrable.
I have been searching to find a way to convert .docx word
documents into html pages, which is fine there are loads of tools to do this. What I want to do however is extract content and apply our custom style for our website, For EG: we have a custom style for the UL Tags and tables to style them in line with our website. Is this possible to do during the conversion process or does it have to be done afterwards?
I've got a custom class for the HTML Editor which adds specific buttons, however I can't figure out how to add specific font names and sizes to the FONTS and FONT SIZE boxes using the code below. I've figured out that simply adding the drop downs for the FONTS and FONT SIZES isn't enough. Once they're added, the specific have to be added.
YES, I have tried adding them using the FONTS and FONTSIZES properties in the HTML markup but after extensive research have determined that it can only be done via code.
I am trying to use a button to dynamically create a brand new tab every time i click it and load a control in there. I'm starting on the tab creation so far. I have on my aspx page, an update panel and a tab container control to handle it. The issue I am having is that the button will only create one tab no matter how many times I click
I am creating a custom control by inheriting a server control, say LinkButton. There are properties like "BorderColor" available in LinkButton. Let's say, I don't want this particular property to be available when I create an instance of the custom control.
I want to completely hide this particular property (I don't want to override it but disable it.)
I have been using the toolkit for 3 years and update it as new releases come out but recently (after the 10/09 update) whenever I try to use the default styles with a control they don't display. For instance, the calendar extender and the validator callout extender are missing their default styles. Well only part of that statement is true. With the validator callout the ! image displays but no other style is present.
what to do or what could be going on? I have cleared out my IE cache, history, cookies and still experience it.
I'm looking into using the HTMLEditor from the toolkit. I know its open source which isn't the problem. The problem is that I don't want to have my program to be open source but would like to use the editor. The source code I'd like to be paid for where the compiled version (the dlls and aspx pages) will be free to download. Is it possible to do that?
I am using the Html Editor Ajax Control Toolkit for. Net 3.5 and I need as a va text being typed and reach the lateral borders of the editor for him to play next line and do not let avontade type and add a scroll horizoltal.In short without horizontal scroll
I know this issue has been up here before, but I could not find any answer for it.Is there anyway to add a custom button / control (dropdown or whatever) for H1, H2 tags to use with the HTMLEditor.Where can I add such funtionality? Is it possible to use some custom overriding i a separate .cs class.Please provide some example how to do this.
I have a master page with an accordion in it inside the accordion panel1 are 3 dropdownlists (ajax cascading) and a button when the default page is loaded i want to select the dropdown values(this works) and then click the button to redirect to another page called test.sapx (this works). The thing i also want to do is pass the dropdownlist values to the new page as the dropdownlists reset. I was trying to do this through the click event on the button and set them in a session variable. The click event isn't firing at all. The page redirects and then if i click the button again it fires the event?