When I Create WebView in Kodular, Images Aren't Displaying Properly, I Know I Should Implement getDomStorageEnabled. But How To Do In Kodular WebView?
Related
I have a single HTML file that contains some JS functions and CSS styling.
Is it possible to load my html file into an embedded widget on Flutter Web? I've successfully accomplished this on iOS and Android using the flutter_webview pacakge, but haven't found a solution for Flutter Web.
There is a HTMLElementView widget which can help you embed Html in flutter web. This widget can take an Iframe and render it. If you don't prefer Iframe then you can embed simply a BodyElement from the dart:html library directly.
An example of embedding Iframe is availabel here. Eventhough its from an old repo, the code is valid and I couldn't find a latest one.
If you don't want do go the tough way, there is simplified widget from Rodydavis which is available here called easy_web_view.
Still if you need code sample a create simple dart pad and share the MRE, I will try to help. :)
For the Iframe example, you can do something like this
First, import 'ui' library, and 'html' library.
import 'dart:ui' as ui;
import 'dart:html';
Second, register your 'Iframe' with viewType 'test-view-type' just for example.
ui.platformViewRegistry.registerViewFactory(
'test-view-type',
(int viewId) => IFrameElement()
..width = '640'
..height = '360'
..src = "https://www.youtube.com/embed/5VbAwhBBHsg"
..style.border = 'none');
Note: you will notice that the compiler can't find platformViewRegistry method but it's okay if you choose to Debug anyway and it will run correctly without any problems.
Finally, use HtmlElementView widget to run this Iframe
return Scaffold(
body: Column(
children: [
Text('Testing Iframe with Flutter'),
HtmlElementView(viewType: 'test-view-type'),
],
));
You can use this package flutter_widget_from_html
While defining the widget you need to set webView: true to get iFrame support
I just tested and it is working fine on web, and this package supports local assets too
Using K12SP and its MVC model, I would like adding embedded YouTube videos in my views. I saw that in the CKEditor, there is a widget for doing so and it adds corresponding customized HTMl tags such as :
{^widget|(name)YouTubeVideo|(VideoURL)https%3a%2f%2fwww.youtube.com%2fwatch%3fv%3diwqgcxc0r5gfTzgw%26list%3dPLKeH-azh54PWS4kozV421JGVhCd5yw9Ia|(Width)425|(Height)355|(AutoPlay)False|(widget_displayname)YouTube+video^}
However, in my view, I now need to process theis syntax to actually embed the video as for the time being, it is just showing the raw code. How can I do this? I searched for some tutorial but didn't find any.
Is there a place where front-end code for these default widgets of the rich editor is made available?
Thank you for your help
Sylvain
Why don't you use regular embed markup? E.g.
<iframe width="560" height="315" src="https://www.youtube.com/embed/GkagBXZQvOI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
HTML is the same for all the videos, you'll need to inject video URL into it.
The inline widgets are not supported in the MVC approach. You still have the toolbar buttons in the CKEditor on the Content tab - but this is because you can also have a portal engine site in the same instance. So, this means, if you want to use the inline widgets, you will need to parse the text value when getting it from Kentico, extract the Youtube URL and basically replace the widget code with the HTML markup mentioned by Roman. It may be just easier to hide the toolbar buttons for widgets for your editors and let them just to insert the URL directly.
Am currently working on a uwp project which involves using a carousel that has some sort of grid of pictures that can be swiped by clicking some round navigation buttons. This is also similar to the carousel in Twitter bootstrap. To get a better picture of this, an example is shown below
Rather than different apps on display, different pictures from the user library would be shown. I would like to dynamically display the first 100 pictures from the user's library. I have searched the internet for something similar to this, but the closest I can get is http://blogs.u2u.be/diederik/post/2015/08/23/A-CoverFlow-control-for-the-Universal-Windows-Platform.aspx.
How can I achieve this?
Have you taken a look at the FlipView class?
https://msdn.microsoft.com/library/windows/apps/br242678
Or the CaouselPanel class?
https://msdn.microsoft.com/library/windows/apps/hh967950
and implemented them with a different data template (perhaps a styled gridview) instead of strictly images?
This is the flipview page from the windows dev center:
https://msdn.microsoft.com/windows/uwp/controls-and-patterns/flipview
It should explain the basics of how the itemcontrol works.
Have a look at FlipView. I hope that is what you are looking for.
I have to display 360 still images in my Android app. I want the exact same feature like YouTube's 360 video but for still images.
I am essentially lookin for the same functionality of full screen 360 and when clicked on cardboard button switch to cardboard view.
I want to use this in both modes as it will enable the user to choose whether to use the cardboard or not but still be able to move around and view everything.
I want the same features when you open YouTube 360 example
I started reading from getting started for cardboard sdk for Android from here. It talks about using opengl and functionality of selection and updating the UI dynamically using opengl. I don't need those features, I only need to display static 360 images.
Please point me in the right direction.
You can use VrPanoramaView
https://developers.google.com/vr/android/samples/vrview
For the fullscreen, use setDisplayMode
panoWidgetView.setDisplayMode(VrVideoView.DisplayMode.FULLSCREEN_STEREO);
It's really simple to load a panorama image using the cardboard SDK. You need to just include a VrPanoramaView like this in your layout
<com.google.vrtoolkit.cardboard.widgets.pano.VrPanoramaView
android:id="#+id/pano_view"
android:layout_margin="5dip"
android:layout_width="match_parent"
android:scrollbars="#null"
android:layout_height="250dip" />
Inside the Activity, the primary method is
VrPanoramaView.loadImageFromBitmap(). It is given a standard Android
Bitmap object and an optional VrPanoramaView.Options object. The
latter is used to configure the format of the image. The Activity also
implements a VrPanoramaEventListener which receives events when the
load operation succeeds or fails.
Quoted from the Getting Started here.
Im trying to use this image with Raphael:
http://upload.wikimedia.org/wikipedia/commons/9/9f/Argentina_Buenos_Aires_City_location_map.svg
I convert it to js with: http://toki-woki.net/p/SVG2RaphaelJS/
And I get this:
Any Idea of what can I do to solve this? This is worst apparently when I add text in inkscape above each reagion to change later via javascript.
Im using SVGWEB now without problems buy Im trying another alternatives because I cannot make the addeventlistener work in IE7/8 like I said here:
can't add listener to a SVG in Internet Explorer using SVGweb
Any ideas?
Thanks!
Try mapSVG plugin instead.
Demo with your map: http://map.karaliki.ru/bu.html (zoom in-out with mouse wheel)
It works in IE7-8 as well.
Plugin's description: http://map.karaliki.ru