Is it possible to embed a "static" file or dynamically generated PDF in jQuery UI dialog?
Not consistently as everybody has the default behavior set differently. The only reliable way would be to generate HTML or an image to put in the dialog, even with an iFrame.
Tried an IFrame? :)
Related
I have a webview in my UWP windows store app. It recognises html content and renders accordingly. Now I need this webview to be editable. Please help someone.
Have a local html file which has body as contenteditable div and using WebView.NavigateToLocalStreamUri method (Here's the Sample), navigate to this page.Then set the div's content with your string. Also refer WebView.InvokeScriptAsync and ScriptNotify to inject and retreive data from webview.
The WebView is for displaying HTML content only. You'll need to use a different control for editing HTML.
Out of the box there's nothing specific for this. The nearest is the RichTextBox but you'll need to convert what this creates from RTF to HTML. This answer to a similar question points to this guide on how to do it.
you can "inject" javascript to the webview when navigation complete.
the inject script you can do the logic you want in .and you can inject this in the NavigateComplete Event.
WebView1.CoreWebView2.NavigateToString( "<HTML><HEAD/><BODY contentEditable='true'>Hello 2</BODY></HTML>" );
If i create a div that has contenteditable true inside of an iframe and if you double click it it becomes non functional.the focus is still in the iframe and you can see the cursor, however it does not respond to keydown
Does anyone have an idea of how I can i overcome this?
EDIT:
i have implemented a dojo editor. if you open this link in ipad you will see the problem as described above.
Which OS you are using? You should make sure that you are using OS 5.0 or later. According to the (Apple's Technical Notes) and Safari Web Content Guide. It is written:
The HTML contenteditable attribute is supported in iOS 5.0 and later. In earlier versions, replace contenteditable, used to enable text input within a styled element, with a styled textarea element. In Safari, you can customize the appearance of textarea elements using CSS. If necessary, you can even disable any platform-specific, built-in styling on a textarea element by setting -webkit-appearance to none.
So, if you are using an old OS version, you could use textarea elements instead of contenteditable. Then, it is guaranteed that your application will work as well.
PS. you can use your IPAD to go on this website, to try how does it work with textarea. It might be an example for you.
Hope that helps.
Trying to get a contenteditable div to work inside of an iframe is one level of complicated, if you are trying to get it to work inside of a specific WYSIWYG editor like Dojo editor, is another level harder, as there is a lot of JavaScript affecting the interactions. It would help to explain the parameters a little better in your question.
Have you used a browser debugger (like Firebug) to see what's happening when you click?
This other SO question and answer about contenteditable div vs iframe is useful.
Finally, if you are using iOS Safari, make sure you are using Safari 5.0 or better as the contenteditable attribute was only recently supported on that browser.
EDIT:
Since you are using iOS 6, you should be using the iOS Safari JavaScript Debugger to let you know what's happening a little more clearly when you click on the editable div. If you can find some more specific error messages, please update us.
have download Jquery DatePicker and try to add to my View.
But the DatePicker only work fine when I remove all my page css file
If I keep both of them, the DatePicker display very strange with a small rectangle
I am using Jquery 1.8.2 and Jquery-ui 1.8.24
I think the main reason is that there is some duplication between css in my file with the css in the DatePicker
Please help me to solve it
Thank you in advance
I suggest you to download firebug,if you haven't it already, and select the datapicker.
In this way the firebug console display you on the right column the CSS style related to the selected item,here you can disable the CSS property and see wich one cause you the problem.
Also be sure that you have the jquery ui images in the correct folder
I'm designing Windows 8 Reader app, and i have to use a control to display the HTML content in "Webview". I got this right now. My problem is how to increase the font in the HTML content in webview. I don't how to start this.Can any one help me..
I mainly develop for android. But i do have a friend who had the same problem..
What you can do to solve this problem is calling javascript for the webview..
this way you can edit the style of the website from the javascript you call.
But that's the direction i would be looking for now..
Edit..
It should be something like this:
YourWebView.InvokeScript("your script", null);
I need modal dialog box in which I can open forms and other html pages. It should have on/off and min/max button. Could anybody suggest me any link for the same. I am not getting this type of widget anywhere.
The JQuery plugin SimpleModal is pretty effective. I have used it before and am quite sure it should provide the functionality you require.