I'm very new to TVML and web development. I'm trying to use the tv-placeholder style tv to set a default image for an img
It works when I use the size configuration:
width: 520; height: 280;
However, It does not with the custom size
width: 1235; height: 314
I can advice you to implement your own TVML-item that will be used as an image with a custom placeholder (also, you will be able to implement cache policy). Read more about the TVMLKit. I think you will need to inherit TVImageElement class and override some methods. You will be able to use any images with any resolutions from any sources (local storage and other).
Related
In my Blazor application I'm trying to display swagger within the application instead of navigating to swagger. Here's the code I'm trying to use.
#page "/admin/swagger"
#*#attribute [Authorize(Roles = "Admin")]*#
#*#attribute [Authorize]*#
<iframe src="swagger" height="400px"></iframe>
It's rendering like this...
How do I get it to have a static height or at least fill the page?
Thanks!
You can use CSS isolation on your page to do the sizing.
AdminSwagger.razor
#page "/admin/swagger"
<iframe src="swagger"></iframe>
AdminSwagger.razor.css - file within the same folder that contains your component AdminSwagger.razor
iframe {
height: 100vh;
width: 100vw;
}
You will need to adjust the CSS to fit your application's UI.
I am noticing that adobe echosign is setting default minimum height and width using pixels while generating the Iframe for Personal Embedded widgets. I checked the below link (& other REST api documentations) and can't find a property to tell echosign to render the widget in a scalable mode according to width/height dimension of the device as in mobile, tablets or PC.
Api Documentation->
https://secure.na1.echosign.com/public/docs/restapi/v5#!/widgets/createWidget
Adobe EchoSign default Iframe Render setting->
<iframe src="******" width="100%" height="100%" frameborder="0" style="border: 0; overflow: hidden; min-height: 500px; min-width: 600px;"></iframe>
How to tell echosign REST api to dynamically adjust it's Iframe size?
I tried finding a solution to this also, but the short of it is that it can't be done with their widgets. None of their internal settings or the API allow a way to modify the iframe styling.
What does work, however, is adding a little javascript and css to modify the iframe. Here's an example of javascript code you can use:
document.getElementsByTagName("iframe")[0].setAttribute("id", "echosignwidget");
document.getElementByID("echosignwidget").removeAttribute("style");
By adding an id and removing the inline style attributes you are now free to style the element however you please using CSS.
Using Silverstripe CMS (v3.4) when I upload an image using the tinymce editor it automatically sets the width/height on the image. This causes problems such as breaking animated gifs so they don't play and also reduces the quality of static images.
How do I turn this feature off completely so that no resizing is done on upload?
You can modify the insert width of the images instead of them being resized to 600px wide.
mysite/_config.yml
HtmlEditorField:
insert_width:
1200
You can also override the width / height attributes on the image tag with css.
.typography img {
width: 100%;
max-width: 100%;
height: auto;
}
Its not great but its the only work around which I know.
As for animated gifs, these are always going to break if they are resized with php.
HTMLEditorField updates img tags in it's saveInto function. Inside the saveInto function is a processImage extension hook that allows us to manipulate images inserted using TinyMCE.
First we create a CustomHTMLEditorField extension with a processImage function. If the image is a gif we set the img src back to the original image path.
SilverStripe 3
class CustomHTMLEditorField extends Extension
{
public function processImage($image, $img)
{
if ($image->getExtension() == 'gif') {
$img->setAttribute('src', $image->getRelativePath());
}
}
}
Next we add the extension to HtmlEditorField in our config.yml file:
HtmlEditorField:
extensions:
- CustomHTMLEditorField
Don't add images in TinyMCE… it doesn't properly support hi-dpi images and it's really hard to control the resulting layout.
Better use something like a content-block module or just use separate image-upload fields. You could also use something like the shortcodable module to insert media such as images via custom shortcodes.
for my portfolio site, I would like to implement some CSS code that would allow me to control the variables for dynamically scaling images on my Blogger. http://www.bryan3d.com
This means that as you manipulate your window via resizing, the scaling of the images (hosted by imgur) would be resized on the fly.
A working example of this functionality can be seen here, though the user is using Squarespace: http://jasonlavoie.net/personal/#/deusudk-environmentart/
Is there something I can implement to have the same functionality through blogger?
Please see my answer : How do I make an html image responsive?
Add this in you'r css file :
img {
width: 100%;
height: auto;
}
this will affect all img elements. to be more specific, you can use a specific id like :
#headerhj img {
width: 100%;
height: auto;
}
see : http://www.w3schools.com/css/css_rwd_images.asp
Im working on implementing this Social Medial Plugin called Sharre:
http://sharrre.com
For example 5:
http://sharrre.com/example5.html
I cant determine how to style these buttons or tracking boxes so that they will fit on my page. I would like to reduce the width and height for both.
http://jsfiddle.net/NinjaSk8ter/uhhwt/
For example, I have tried to modify the width of the .button which doesnt seem to work:
#example5{
float:left;
margin:28px 0 0 10px;
}
.sharrre .button{
float:left;
width:60px;
}
I have also seen in the docs that:
twitter: { //http://twitter.com/about/resources/tweetbutton
url: '', //if you need to personalize url button
Does this imply that I would need to modify the size of the Image?
The plugin utilizes <iframe> elements and background-image to display the icons. You won't be able to modify them without cutting off part of the images. If you need to change the size of the icon, I would recommend resizing it via your favorite graphics program, uploading it to your server, and calling it via the custom parameter url that you mentioned.