How to show images put with the editor - strapi

I have a text with a image that I put with the WYSIWYG editor. When It goes to preview the imagem is shown perfectly but when I consume the API, I get just a text with the link inside it, and it is show broken like that
![text]( https://res.cloudinary.com/rodolphonetto/image/upload/v1564945137/jekrcusr6jz1mfubb6jm.jpg) Coloquei uma foto diferente só pra testar como funciona colocar fotos aleatóriamente no meio do texto =)

The WYSIWYG return content in markdown format.
See here https://guides.github.com/features/mastering-markdown/
If you want to insert it in your application, you will have to use a convertor from makdown to html for example.

Related

How to render IFRAME tags if it is in text editor?

I am using a tinymce text editor for writing a paragraph. If i include youtube video in IFRAME tags inside a text editor then it doesn't render it in the frontend. Just a plain text of iframe is displayed.
Code
{!! $item->display_paragraph !!}
output
So how do i render iframe along with text using text editor.
Use the TinyMCE Page Embed plugin: https://www.tiny.cloud/docs/plugins/premium/pageembed/#usingpageembed
I solved this by using mutator.
public function setDescriptionAttribute($value)
{
$this->attributes['description'] = htmlspecialchars_decode($value);
}

Outlook img tag is not giving me the correct attachment id

Im trying to create a new outlook add-in that can extract the email content as html, and extracting the email content is working fine Office.context.mailbox.item.attachments
But my problem right is, If there an img tag include to the content. It will give me like this kind of img tag
<img class="x_w-1378 x_h-886" size="349452" data-outlook-trace="F:1|T:1" src="cid:9ea35d14-aa1e-47d6-9c5b-b31ced143981" style="max-width:100%">
<img width="643" height="359" id="x_Picture_x0020_1" src="cid:image001.png#01D8A327.B5A0B590" style="width:6.6979in; height:3.7395in">
I know there's an isInline properties and i can extract the base64 of the attachment.
Now question is, How would i know, if this img tag is for this attachment and vice versa? Like there's no indicator in img tag like this
<img id="AQMT12tasFGA....." src="cid:image001.png#01D8A327.B5A0B590" style="width:6.6979in; height:3.7395in">
Mime Content-Id header is used for In-line attachments, see https://www.ietf.org/rfc/rfc2392.txt for more information. Be aware, you can use EWS to get content ID values of attachments from Office web add-ins.

How can I insert images in lektor markdown sections?

How can I insert an image in a markdown section in lektor. In particular, does the url filter work inside markdown, or who else to I reference the image location inside assets/static/?
Most of the time in the admin site, you want to embed a file listed on the "Attachments" list on the left. To do that, simply use the attachment filename, as in :
![alt text](myimage.png)
Use the standard markdown for the inserting images. For the image named my-image.jpg stored in the assets/static/ use the following markdown code:
<!-- 1) Inserts an image with an empty alt parameter, but better to use the 2nd or the 3rd example -->
![](/static/my-image.jpg)
<!-- 2) Inserts an image also with the text "fancy picture" as the alt parameter value -->
![fancy picture](/static/my-image.jpg)
<!-- 3) Image also has the title attribute -->
![fancy picture](/static/my-image.jpg "Title of the fancy picture")
The snippet above will generate resulting HTML:
<img src="../static/my-image.jpg" alt="">
<img src="../static/my-image.jpg" alt="fancy picture">
<img src="../static/my-image.jpg" alt="fancy picture" title="Title of the fancy picture">
I tested this snippet on my example website and it works perfectly.
Please note the / before static in the markdown code.

How do you add alternative text to images in Dokuwiki?

This is my image syntax...
[{{ :image-link.png?200|This is the caption.}}]
Which adds the image, right aligned.
Your help is greatly appreciated... Thank You!
The DokuWiki syntax you quote shows you are using the Image box plugin - which allows a caption, but produces a blank alt tag.
e.g. [{{ :software:contao:contao_install_open_sauce_00.png |Layout -> Themes -> Themes Import}}]
renders the HTML:- <div class="thumb2 tcenter" style="width:100%"><div class="thumbinner"><img exify_intitialized="true" src="/business/lib/exe/fetch.php?media=software:contao:contao_install_open_sauce_00.png" class="mediabox2" alt=""><div class="thumbcaption"><strong>Layout </strong>→<strong> Themes </strong>→<strong> Themes Import</strong></div></div></div>
and creates an boxed image with a caption (Wikipedia style) and an empty alt tag.
So you can not populate an alt field using the Imagebox plugin, but you can populate an alt field using the [built-in image tag] [3]. The alt tag generated by the built-in image tag is populated by the value you give to the (tooltip) "caption".
e.g. {{ wiki:dokuwiki-128.png |This is the caption}} (see :wiki:syntax#media_files)
renders the HTML <img exify_intitialized="true" src="/_media/wiki:dokuwiki-128.png" class="mediacenter" title="This is the caption" alt="This is the caption">
If you want to use both a title tag (tooltip) and a different alt tag you need to enable HTML in your DokuWiki and add the image using HTML.
What you did should already succeed in providing the image with an alt text (not with a caption!), except that you don't need the external square brakets:
{{ :image-link.png?200|This is the alt-text.}}
If you want a caption instead, you should look at some plugin such as the box plugin.
Finally, if you wanted a link consisting in an image with an alt-text, just use something like
[[www.theaddress.it|{{ :image-link.png?200|This is the alt-text.}}]]

To Show an tooltip on Image in Mvc3

I'm using asp.net MVC3 and i want to show a table containing information about a course
In that i have a field called "Information" which show an image.
I want to show the a tooltip when the mouse is taken on that image
I'm showing image lik this:
<img id="ok" src="../../Images/info.jpg" alt="tooltip"/>
I dont want to use any added plugin
can anybody help me with this?
Use title as well as alt in the Html tag
<img id="ok" src="../../Images/info.jpg" title="This is your tooltip message"/>
alt attributes on img elements are used as alternate text in case the image does not exist. Some browsers display these as tool tips when hovering over the image, but its not standard.
You could use the title attribute to display a tool tip on hover of the image.
You should always provide an alt attribute when using images, this is best for accessibility (screen readers read the alt text), and will fail XHTML if you don't have the attribute.

Resources