I have created a Custom widget in Sitefinity. I want to add a rich Textbox in the widget.
For detail see below images.
Add a rad editor control to your designer .ascx file
<telerik:RadEditor runat="server" ID="RadEditor1" Height="400px" Width="680px" SkinID="MinimalSetOfTools">
</telerik:RadEditor>
You may also need to add telerik web ui refference on the top of the .ascx file in case is not added
<%# Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
if you want to add RadEditor, you needs to perform following steps.
1)In .ascx file add the namespace as shown
<%# Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
2)And replace your textbox with following code.
<telerik:RadEditor runat="server" ID="Mytext" Height="400px" Width="680px" SkinID="MinimalSetOfTools" CssClass="sfTxt">
</telerik:RadEditor>
3)you need to make some changes in the .js file of your widget as well because RadEditor has its own methods to get or set its html. You can use get_html() and set_html() instead of using val() in its .js file
Related
I have simply added SmartGWT example in my application.
But the widgets are not coming up properly
Specially the button , Its simply showing the button text ,and not even the structure of button
please have a look
http://screencast.com/t/ddEQQIZLxq
whereas it should be like this
http://screencast.com/t/8SK16Zhggx
any idea, where i am wrong.
It looks like your theme is not properly loaded. Be sure that you are inheriting theme in your .gwt.xml file.
From https://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/docs/Skinning.html
A skin is implicitly loaded when you add an tag in your .gwt.xml file to include SmartGWT components (name="com.smartgwt(ee).SmartGWT(Pro|Power|EE)"). To switch skins, add the "NoTheme" suffix to the "name" attribute of this tag, then add . These tags cause a tag to be injected into your bootstrap .html page, which loads load_skin.js for the appropriate skin. load_skin.js loads the stylesheet and sets the CSS styleNames and media URLs that Smart GWT components will use.
To inspect your page, you can use firebug and make sure that skin_styles.css and load_skin.js are loaded.
In my tab from home page I want to render a partial view returned by an action controller, with custom css. The home page has its own doctype. Using Umbraco v7.
How can I achieve this? I read http://our.umbraco.org/wiki/reference/files-and-folders/dashboardconfig but doesn't specify this.
You can only load a usercontrol (ASCX) in the dashboards.
But that shouldn't stop you from what you want to do.
Put your Html and css in the ASCX and
put your controller code in the .cs file.
update the /config/dashboard.config
And you are set.
What you could do is wrap your partial view in a macro and call the macro inside the ascx (<umbraco:Macro alias="theMacroAlias" runat="server" />)
Update: you can't set a dashboard for a specific content page. The only way to archive something here is to create your down propertyType
Hi I am working on ASP.NET MVC project. I have textarea in my view where user will get download link to report.
Currently I have this code in my view page :
#if (ViewData["datalink"] != null && !String.IsNullOrEmpty(ViewData["datalink"].ToString()))
{
<textarea class="jquery_ckeditor" cols="65" id="editor1" name="editor1" rows="10">Your report is now available<br />#ViewData["datalink"].ToString()</textarea>
}
For above code output will be like this :
Your automated report is now available
www.test.com
But Instead of showing user directly link, I need to provide text with hyperlink like this :
Your automated report is now available
DownloadLink
How can I achieve this??
This is not possible to do with a textarea. You could use a div construct instead with contenteditable property assigned to it:
<div contenteditable="true"></div>
Which will enable you to place hyperlinks inside + it will give you the same similar functionality as textarea.
Its not fixed content. Your report is now available is editable. User
can edit that.
Instead of TextArea, go for Editor like TinyMCE (with ASP.Net MVC) that will display the content as you need.
I want to increase the size of the Calendar view because the default size is too small for my web application. I've tried to add a cssClass to the datetimepicker tag but it doesn't work, even if I change the width or height the only thing it changes is the field, not the calendar itself.
I'll put an image so you can understand better the problem that I have:
The thing is that the text from the field is correctly viewed, but when I click the calendar button, it shows that tiny view and it's extremelly difficult to pick one date.
The code for the datetimepicker is this:
<sx:datetimepicker name="start_date" displayFormat="dd-MMM-yyyy" value="%{'today'}" />
Any guess?
Ok, It's finally solved:
First I tried to find the file named datefilepicker.ftl inside the struts2-core.jar but I didn't find anything similar.
So after a few hours trying to find which was the correct template of datetimepicker without any luck, I tried to solve my problem using JQuery because when I was searching for the answer I found out a datepicker tutorial using this library.
There's a plugin called Struts2-JQuery that provides you with ajax functionality and therefore with multiple customizations in different widgets.
It's quite easy to install, I just had to download the correct .jar which for me it was Version 3.5.1 ( jQuery 1.8.3, jQuery UI 1.9.2 ). Once I'd downloaded the file, I just had to paste it in the lib folder inside my project. After doing that, I added this line at the beginning of the .jsp file:
<%# taglib prefix="sj" uri="/struts-jquery-tags"%>
With these steps I had jquery functionality inside my .jsp file, so the only thing left to do is to add the datepicker widget:
First I chose the jquerytheme I wanted for my widget, just like this:
<head>
<sj:head jquerytheme="flick"/>
...
</head>
And then, I added my datepicker widget:
<sj:datepicker name="start_date" displayFormat="dd-MM-yy" value="today"/>
And that's it.
If you want to resize the datepicker calendar see the answer of this post:
How to resize the jQuery DatePicker control
<sx:datetimepicker name="start_date" displayFormat="dd-MMM-yyyy" value="%{'today'}" />
It is a dojo tag, so you should be changing the template file corresponding to this tag
Freemarker changes
check for something like datetimepicker.ftl in your workspace. That would be the file rendering your calendar. Any presentation related changes will be done in that file only.
debug using firebug
Another approach can be using firebug in Mozilla firefox and manually try to change the html rendered by the tag. There might lie some CSS solution to your problem
I created an .aspx page for custom section which want some umbraco controls to display.
For this i added the following line in .aspx page.
<%# Register TagPrefix="umb" Namespace="umbraco.uicontrols" Assembly="controls" %>
But i didn't get the controls like UmbracoPanel and Pane..
Can you help me on this.
Did you add controls.dll as a reference to your website project?