Plone 3.2 KUPU Image Caption Impossible - plone

I have been having difficulty in captioning images using KUPU in Plone 3.2
I have enabled the following under the "Visual Editor" in mysite.com/plone_control_panel:
Link using UIDs
Allow captioned images
When browsing the KUPU "Insert Image" box, I can select an image. Enter "Text Equivalent" text and tick the "Caption" box. Once I click this box my "Text Equivalent" box disappears, but nothing else appears, thus preventing me from entering any caption text.
If I tick the "Caption" box and save my page I can see the following in my HTML:
<dl class="image-left captioned">
<dt>
<img width="400" height="299" title="PTA" alt="PTA" src="image.JPG">
</dt>
<dd style="width:400px" class="image-caption"></dd>
</dl>
As you can see, it creates the necessary HTML I am just unable to alter the text contained within the
<dd style="width:400px" class="image-caption"></dd>
tags.
I can see no javascript errors in my Firebug console for anything related to captioning.
Any help would be greatly appreciated.

The caption-tag gets the description of of the image-item, so to change the caption you need to edit the image itself and change the description.
Note that this value is cached, so you need to clear the browsercache to see the changement on reload of the page with the inserted image.

Related

Disabled textbox on Microsoft Edge is not selectable

In my webpage, I need a disabled textbox to show content (very long).
<input disabled type="text" value="a very long long long text...">
In Chrome, we can select the text in the disabled input to scroll to view all content.
However, In MS Edge, it seems that the disabled textbox is not selectable, therefore, it cannot be scrolled to view entire content.
Is there anyway to customize CSS to select text on disabled textbox on Ms Edge.
Actually content is selectable from disabled textbox in Edge but it will not scroll like it scrolls in Chrome.
<!DOCTYPE html>
<html>
<body>
<form action="">
Text : <input type="text" name="txt1" value="Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document. To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. For example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries." disabled><br>
<input type="submit" value="Submit"><br>
<textarea rows="4" cols="50">
</textarea>
</form>
</body>
</html>
Output in Edge browser:
So if your requirement is to select the text than it is possible as you can see in my testing result.
If your requirement is to scroll the content then at present it is not possible with MS Edge browser. As a work around, you can try to use read only instead of disabled as already suggested by #Turnip. It will allow user to scroll the text in textbox.
I will try to submit the feedback to Microsoft via our internal channel regarding this issue.

Is it possible to SCALE a pasted image in Jupyter Notebook?

I can paste/drag&drop images into a jupyter notebook markdown cell.
They will appear as follows:
![image.png](attachment:image.png)
The image is displayed correctly (but to large).
I am however unable to scale them. I tried varius solutions from this question: Changing image size in Markdown
Unfortunately they all won't work for me. After pressing shift+Enter the cell just displays the entered text and the image is gone. What am I doing wrong?
As of today the accepted answer no longer works, the "proper" way of doing it is:
<div>
<img src="attachment:image.png" width="400">
</div>
But even this variant is not ideal as it doesn't export image when saving as to html. Votes here are welcome: https://github.com/jupyter/nbconvert/issues/1057
Problem solved in this anwser:
https://stackoverflow.com/a/49150804/5105118
<img src="attachment:image.png" width="400">
EDIT
to be more precise I will add a step-by-step
Copy your image (not the URL/path but i.e open in Paint and select region to copy, then press Ctrl+C)
go to notebook cell in math mode and paste image with Ctrl+V
something similar as the following should appear in your cell: ![image.png](attachment:image.png)
edit this line to match <img src="attachment:image.png" width="400px"> or apparently in newer jupyter versions (>4.4.0) surround them with <div> tags as noted in the answer from Antony Hatchkins: https://stackoverflow.com/a/58511216/5105118
somehow the pasted image is linked to the text "attachment:image.png" thus this part should not be touched while editing
In a markup cell copy an image, you then get something like this:
![afbeelding.png](attachment:afbeelding.png)
Then you may remove this line and copy this into the cell:
<div>
<img src="attachment:afbeelding.png" width="300">
</div>
Then the image is scaled. The essence is that you first have to copy a real image into the markup cell. Depending on language, you always get the same text, but the image as soon as you execute the cell. Then replacing the text with the HTML text does the trick.
Nothing happens until you copied a real image into the cell, which given

Wordpress Evolve Theme: Change Images in Slider

In the Carousel Slider at the Evolve Theme, there are a few sample pictures.
How can I change them into new pictures and add an href that an article opens by clicking on an image?
You upload a photo in the media library with the correct dimensions for the slider.
When you select to edit the image you get the full size version.
In Firefox I right click on the image and ask to copy "Image Location", in the Chrome browser "Copy image URL"
that gives me the url to the image in my clipboard something like
http://www.####.###/wp-content/uploads/2013/06/image.jpg
Then you go to the widgets
You have to add the "T4P Carousel Slider" to the Header1 area. If you don't The theme automatically loads its own custom widget for advertizing the theme. Once you add the widget you will get a code box that by default has their code in it.
You are going to replace that code with your own it is not to hard but it is certainly not a drag and drop option.
Once you drag the Carousel Slider to the Header you will see the code.
you will see 4 sections that look like this:
<img src='http://www.####.###/wp-content/themes/evolve/library/media/images/slide/slider_img_01.jpg' alt='' />
<div class='carousel-caption'>
<h4>Built-in Bootstrap Elements let you do amazing things with your website</h4>
You replace this part of the code with the url to the image from the library using cntl-v and ad a alt tag if you like
Before
http://www.####.###/wp-content/themes/evolve/library/media/images/slide/slider_img_01.jpg' alt='' />
After
http://wp.fofc.org/wp-content/uploads/2013/06/baby.jpg' alt='Baby' />
Next you can add a Caption to be over the top of the image
Before
Built-in Bootstrap Elements let you do amazing things with your website
After
This is a really cool image
down at the bottom of the code box you will see additional code.
This controls how may dots are in the rectangular window for navigation one line for each dot
So you want to have as many lines as you have images. If you only have 3 images take the line with data-to='4' completely out. or you can add another line at the bottom:
5
<div id='carousel-nav'>
<a href='#myCarousel' data-to='1' class='active'>1</a>
<a href='#myCarousel' data-to='2'>2</a>
<a href='#myCarousel' data-to='3'>3</a>
<a href='#myCarousel' data-to='4'>4</a>
-- add or remove lines above this line
</div>
This controls the navigation box in the lower center of the slider. However the dot does not seem to move as the slides change automatically. The dot only moves when you click on it.
If you prefer you can remove the entire div from the code and that will remove the navigation box.
Hope this helps.

Add background image to paragraph in rich text editor tiny mce

I have spent hours to think how to get this thing working without any success , what I want to add background image to selected paragraph in tiny mce, I can do that using style dropdown in rich text editor but I want to extend that image dynamically when the selected paragraph text extend. This can be done using 3 divs like:
<div id="top"></div>
<div id="center"><p></p></div>
<div id="bottom"></div>
But the issue is I can't do that using rich text editor tiny mce, and I want to give that ability to front end user who can just select the paragaraph and set the styling from dropdown in order to show the background image to that paragraph on the website, I have included the background image just for guidance, can any one provide any assistance or suggestions on how to get this thing working. Here's the background image:
you can use the 'Template' plugin for TinyMCE
or 'MySnippets' package for TinyMCE
hope this helps

onclick print , not printing form's backgroup image

I wrote code that simply generates a table gridview. The last column provides a print button option for each record. if the user clicks the print button a pop up window is displayed with background image and three pieces of data. it looks great on the screen but when you print the form, everything will print (data) but the background image. Any suggestions? thanks.
For this issue you can use Frédéric Hamidi solution and change the browser settings or you can do the following with CSS.
wrap your code in div tags and call the background image as an img object. and set the background color to white. for some strange reason this does the trick and users will not need to change the browser settings to print an image.
#container {
width:500px;
height:393px;
background-color: #FFFFFF;
}
<div id="container">
<img src="image.png" style="position: absolute;">
<table>
<tr><td>test</td></tr>
</div>
The browser ultimately decides whether or not to print background images. For instance, under Internet Explorer, you need to enable that feature in the Advanced tab of the Internet Options dialog box.

Resources