Adding custom icons in Sitecore requires the following step:
Zip it is all. The name of archive should be the same as the containing folder (MyIcons.zip);
Upload the zip file by the path which was mentioned above: \sitecore\shell\Themes\Standard.
The problem is when I need more icons I need to add the icon and zip the file again. Is there a way to avoid this or make this maintainable without using zip file?
You can directly specify the URL of the icon you wish to use in the Icon field of the item. This can be an image on disk:
Or it can be an image from the Media Library:
I would recommend using the format such as: /-/media/F8C69CCD422C40AC843D2E4144F16964.ashx?thn=1
This ensures that the icon used is of thumbnail size (the thn=1 parameter) and by using the guid of the media item it means that the icons can be moved/restructured without having to update the Icon fields.
In both these cases, you need to manually enter the path of the icon file, you cannot specify it using the icon selector dialog.
Related
I'm trying to customize the CTA section with new images and the support documentation for Austin Night says you're supposed to customize images within the JSON files. I uploaded some images to the image manager but now I'm unsure of where to copy over the new image file within the coding - So I need help knowing where exactly I do this and what part of the image URL is supposed to copy over the default image text. Thanks!
I've uploaded images to the Image Manager and I've copied various parts of the image URL to replace the theme's default images, but nothing seems to work. I've been working within the en.JSON homepage file and I even tried to change the image within the OB Custom images file all in Stencil File Editor, since the theme documentation doesn't give much description on what to do exactly besides to customize in the JSON file.
How do you include your own icons in Vaadin Flow? Do you make an HTML file like this one from Vaadin Icons and include it via
#HtmlImport("frontend://path/to/your/icons.html")
I did not find any documentation so far. So I guess this is one possibility?
Here is an example of adding some IcoMoon icons to a Vaadin Flow App;
Using the notes in https://icomoon.io/docs.html under the section 'Generating Icons in SVG & More', I generated the Polymer compatible icon set in iron-iconset-svg format.
Visit https://icomoon.io/app/ and select the icons (you can add icons from different libraries),
click on 'Generate SVG & More',
click on 'Preferences' and select Polymer as the target format and download,
Extract the zip file, and open the polymer folder. It contains the *-svg.html file which is the 'iron-iconset-svg' format file that #Jouni is talking about in the above note. This html file is actually a collection of inline SVGs.
Copy the html file to your resources folder;
e.g. resources/META-INF/resources/frontend/styles/
And import that using #HtmlImport;
e.g. #HtmlImport("frontend://styles/icomoon-iconset-svg.html")
Then you can create icons using the collection name and the icon name;
Icon icon = new Icon("icomoon", "mobile");
The collection name is the name value in <iron-iconset-svg name=... in the html file.
update: starting from Vaadin 14 (except in Compatibility mode) you should instead use #JsModule. i.e. #JsModule("#polymer/iron-icon/iron-icon.js")
You can also create the icon collection manually.
I used https://github.com/vaadin/vaadin-icons/blob/master/iconset.html as a template (more or less):
Draw or download some SVG files.
Create a new SVG file myicons.svg that starts with
<iron-iconset-svg name="myiconset"><svg><defs>
... and ends with
</defs></svg></iron-iconset-svg>
Within the defs-tag you insert a "g" element for every graphic, e.g.:
<g id="myicon" viewBox="0 0 52 56"></g>
Set the id unique within this file.
Set viewBox attribute (visible dimensions) with the values from the original SVG file.
Copy the path element(s) from the original SVG file (and remove any "g" or "symbol" or "title" or whatever else elements that are no path/line/shape) and paste it/them into your newly created "g" elements.
<path d="m14 15h-13c-.55228475 [...]" />
Place this created myicons.svg file wherever you want it to be.
Within your Java code read that myicons.svg file and paste it in your site, e.g. in this direct way (and replace the path if you chose another one):
add(new Html(Files.readString(new File("src/main/webapp/img/myicons.svg").toPath())));
Create an icon:
com.vaadin.flow.component.icon.Icon myIcon = new Icon("myiconset", "myicon");
myIcon.getStyle().set("color", "var(--lumo-primary-text-color)");
add(myIcon);
Can anyone please help me. Am using adobe captivate 9. I have a content with image that exceeds the slide spacing, i want to set this content within the page using scroll. I have tried using text-scroll widget but i cant add images to it.
Put the image into an MS Word document and save it as an HTML web page. The result will be an HTML file and folder named "[file name]_files" in whichever folder you saved it to.
Select both the HTML file and the folder, right click, and choose Send to -> Compressed (zipped) folder in the context menu.
Dragging that ZIP folder directly onto your Captivate slide will create scrolling HTML Web Object based on the formatting of the MS Word file. It will show up in your Library in the "Web" folder.
Unfortunately, this is a feature that is missing from Captivate. The best solution I've found is to make an html file that includes the text and points to the image, then zip and import as an HTML5 Animation.
The new TinyMCE 4.3 Image Tools (eg when cropping) saves images as blob data instead of image files in a directory. the edited mage url is like
blob:http://www.example.com/f2953aa1-e64f-49e1-a6e3-a283986663bf
I want to upload the image file to a specific folder and then use it as regular image referance / path.
Note
The question I am going to put is similar to Image edit issue. but the answer to this question is not working. I also tried http://archive.tinymce.com/forum/viewtopic.php?id=35740 solution but not working because it produces always same name image name.
The basic process is that TinyMCE will create a separate HTTP POST for each image that you modify with the image editor. It will send that image to a URL of your choosing (via HTTP POST) based on the setting of the images_upload_url option in your init.
The image handler at the URL referenced in the images_upload_url (which you have to create) has to do whatever needs to be done to "store" the image in your application. That could mean something like:
Store the item in a folder on your web server
Store the item in a database
Store the item in an asset management system
...regardless of where you choose to store the image your image handler needs to return a single line of JSON telling TinyMCE the new location of the image. As referenced in the TinyMCE documentation this might look like:
{ location : '/uploaded/image/path/image.png' }
TinyMCE will then update the image's src attribute to the value you return. If you use the images_upload_base_path setting in the init that will be prepended to the returned location. The TinyMCE page has more details on all of this:
https://www.tinymce.com/docs/advanced/handle-async-image-uploads/
The net here is that TinyMCE knows when an embedded image exists in your content but it can't possibly know what to do with that image in the context of your application so that job (the "image handler") is something you must create.
I'd like to change the default icons for the Folder and Document types. Running Plone 4.2 with Sunburst. I tried customizing the portal_skins/plone_images/folder_icon.png to hold the file myfolder.png but this had no effect.
I've also tried setting the Icon property on the Folder type to point to an alternate file following what I see in the Icon property of other types, ${portal_url}/myfile.png. If I then go to http://mysite.com/myfolder/myfile.png, I see the icon, but it does not show up in contents listings -- next to the text "myfolder" there is still the normal folder icon.
I also tried going in and changing the URL in a custom copy of the sunburst theme where it is using a url of contenttypes-sprite.png, but that just made the icons go away.
I would be pulling my hair out if there were any left.
Make a copy of the 'contenttypes-sprite.png', edit it with an image-manipulation-program of your choice (mine is GIMP) to 'overpaint' the folder-icon right in the sprite and put it in a skins-folder of your product (or in the ZMI's custom-folder). Clear browsercache when reloading.
With Plone-4.2.0 this works perfectly fine, oddly with Plone-4.2.1 I needed to adjust the background-positions slightly.