I have installed the ExpressionEngine 2.11. and I have created a Channel Field of a textarea type to post the full description of my articles.
My issue comes when trying to include Twitter or Instagram embed code like this one
<blockquote class="twitter-tweet" data-cards="hidden" data-lang="es"><p lang="es" dir="ltr">🏈 SÚPER QUINIELA #NFL 🏈<br><br>¡Gana tarjetas de regalo y viajes a partidos oficiales!<br><br>Juega 👉 t.co/SVMJMjRaHZ pic.twitter.com/MIkMkRdCAa</p>— Innovasport (#innovasport) 1 de septiembre de 2016</blockquote>
<script async src="platform.twitter.com/widgets.js" charset="utf-8"></script>
I've got the following error
Any idea how to let textarea fields to support embeddeds HTML characters?
Greetings, Leo
Related
I am trying to download every CSV file on this site: http://data.cnmc.es/datagraph/jsp/inf_trim.jsp
Each CSV is in a radio button inside a sub-page (not a different site) of that main page (I believe the term used to describe this type of site is 'dynamic'). Example of location of one of the CSV files:
image
Problem:
When I run the following code in python in jupyter notebook in order to find patterns in the html - so that I can automate the file downloading process - only a small part of the html is retrieved.
Code:
import requests
from bs4 import BeautifulSoup
webpage = 'http://data.cnmc.es/datagraph/jsp/inf_trim.jsp'
response = requests.get(webpage)
html = response.text
print(html)
What it retrieves:
...some code above which I have purposefully removed for post...
<noframes>
<h1>Informe Trimestral</h1>
<p>Aplicación de consulta de los informes que elabora trimestralmente la Comisión Nacional de los Mercados y la Competencia (CNMC)) en relación al mercado de las telecomunicaciones en España</p>
<h2>Trimestral IV 2014</h2>
<p>1. DATOS GENERALES DEL SECTOR</p>
<p>2. INFRAESTRUCTURAS</p>
<p>3. COMUNICACIONES FIJAS</p>
<p>4. COMUNICACIONES MÓVILES</p>
<p>5. SERVICIOS DE TELEVISIÓN Y RADIO</p>
<p>6. SERVICIOS MAYORISTAS</p>
<h3>EL SECTOR</h3>
<h2>COMUNICACIONES FIJAS</h2>
<h2>COMUNICACIONES MÓVILES</h2>
<h2>AUDIOVISUAL</h2>
<p>2014 © CNMC Comisión Nacional de los Mercados y de la Competencia.</p>
</noframes>
...some code below which I have purposefully removed for post...
What I can see using 'right-click > inspect' on the site:
image
As you can see, the 'right-click > inspect' html shown is much more extended (i.e. it includes <a> tags to dynamically navigate the page which the code-retrieved html does not).
How can I fetch ALL of the html, including those <a> tags?
I believe the answer/problem may lie in this line of code (complete guess, have no clue really):
image
FYI: please correct me if my strategy is not good. My intention is to get the full webpage html to find a pattern in the html tags that will allow me to automate the process of clicking on each CSV radio button using the selenium library
Thanks for your time
Jaime
I am facing an issue in converting HTML text into word doc supporting format so I can generate a doc file using docx.js lib. Right now HTML tags are showing up as a plan text.
and this is the lib I am using: https://docx.js.org/
<p>
<strong>voice:</strong>
During an address to Congress, George Washington said “If you can’t send money, send cigars.” [pause] Or something like that. [pause] There’s no question that Washington was a wise man. He knew that premium quality cigars are worth their weight in gold. And if he were alive today, he’d be running the country from the lounge at
<strong>No Name Cigar Company.</strong>
Where the conversation never comes to an end – and neither does their premier cigar selection. Mingle with legends – at
<strong>No Name Cigar Company.</strong>
</p>
<p> </p>
<p>Visit them online at <strong>NoNameWebsite.com</strong></p>`
Hi Please Use googoose
this works very fast and without glitch
here is the complete code example
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/aadel112/googoose#master/jquery.googoose.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var o = {
filename: 'test.doc'
};
$(document).googoose(o);
});
</script>
</head>
<body>
The content that is rendered to a Word doc will need to be wrapped in a div with the classname googoose-wrapper, by default.
<div class="googoose-wrapper">
<p><strong>voice:</strong> During an address to Congress, George Washington said “If you can’t send money, send cigars.” [pause] Or something like that. [pause] There’s no question that Washington was a wise man. He knew that premium quality cigars are worth their weight in gold. And if he were alive today, he’d be running the country from the lounge at <strong>No Name Cigar Company.</strong> Where the conversation never comes to an end – and neither does their premier cigar selection. Mingle with legends – at <strong>No Name Cigar Company.</strong></p> <p> </p> <p>Visit them online at <strong>NoNameWebsite.com</strong></p>
</div>
</body>
</html>
I'm doing a study with Angular for news, announcement website.
I'm printing the content as <div [innerHTML]='res.content'></div>. But the contents have youtube links and they appear as text.
I am;
In the content of the 'div' element, I want to determine the links in youtube and convert them to 'embed code'.
An example res.content from Api;
"<p style=\"text-align: center;\"><strong>test yazıdır.</strong></p>\r\n \r\n\r\n<b> </b>\r\n<h4>project description</h4>\r\nMaturity is required as young people will look to the volunteer (&\r\nstaff in general) as a role model.\r\n<div class=\"clearfix\"></div>\r\n<h4>how to apply</h4>\r\nSend CV and covering letter to <strong>info#galwaysteinerschool.com</strong> and name of sending organisation where applicable\r\n\r\n \r\n\r\n<strong>Son Başvuru Tarihi:</strong> 01/02/2019\r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\nhttps://www.youtube.com/watch?v=sgUVUVY2e-I\r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n<strong>EVS gönderici kuruluş listesi ve başvuru ile ilgili makalemize ulaşmak için tıklayınız.</strong>\r\n\r\n<strong>Diğer AGH/EVS ilanlarına ulaşmak için tıklayınız.</strong>\r\n\r\n<strong>Motivasyon Mektubu Nasıl Yazılır makalemizi okumak için <a title=\"Motivasyon Mektubu Nasıl Yazılır?\" href=\"http://www.example.com/motivasyon-mektubu-nasil-yazilir/\" target=\"_blank\" rel=\"noopener\">tıklayınız.</a></strong>\r\n\r\n<strong>Blog yazarımız Seher Can’ın Avrupa Gönüllü Hizmeti deneyimi makalesi için tıklayınız.</strong>\r\n\r\n<strong>Blog yazarımız Emre Gögebakan’ın Avrupa Gönüllü Hizmeti başvuru süreci makalesi için tıklayınız.</strong>\r\n\r\n<strong>AGH/EVS mülakatı teknikleri makalemiz için tıklayınız.</strong>\r\n\r\n<strong>AGH EN ÇOK SORULAN SORULAR VE CEVAPLARI makalemiz için tıklayınız.</strong>\r\n\r\n<strong>Başarılı Motivasyon Mektubu Teknikleri makalemiz için tıklayınız.</strong>\r\n\r\n \r\n\r\n \r\n\r\n<strong>Kaynak:</strong> https://europa.eu/youth/volunteering/project/9729_en\r\n\r\n \r\n<p style=\"text-align: center;\"><strong>Bu ilan Avrupa Birliği resmi sitesinden duyuru amaçlı kaynak gösterilerek Türkçe diline çevrilmiştir. İlan sorumluluğu example.com sitesinde değildir. Özgeçmiş ve motivasyon mektubu hazırlanması işlemlerinde ÜCRETSİZ olarak kurumumuz destek vermektedir. Kurumumuzun başvurunun olumlu veya olumsuz sonuçlanması konusunda herhangi bir taahhüdü ve etkisi yoktur.</strong></p>";
What kind of a method should I apply for this? and how can I?
What I want to do exactly is find the youtube url inside the article and automatically translate it into the youtube embed code.
Thank you from now.
You could use regex to get the video id from the youtube link.
Then all you need is to add it to the youtube embeded link.
So if you use regex to find the video link from the following link:
https://www.youtube.com/watch?v=sgUVUVY2e-I\
it would return you with this: sgUVUVY2e-I
Then you can insert that into the embeded link like this:
https://www.youtube.com/embed/sgUVUVY2e-I
There are a tone of tutorials on using regex to find information inside a text, then it is all up to you how you want to dislay it.
I have an issue with jQuery TE editor (Download the files here) in that the paragraph tags are not wrapping where they should.
I get:
first sentence<p></p>second sentence<p></p>thirds sentence<p></p>
when it should be:
<p>first sentence</p><p>second sentence</p><p>thirds sentence</p>
For some reason it is placing the text outside of the tags. I've echoed the posted data below the form field to check.
Any ideas anyone? :-)
I am trying to display a web page according to the language that I will specified. For example:
<body>
<div id="monlabel"> Bonjour </div>
</body>
when I choose frensh, the text in the div text will be 'bonjour', and when I choose english, the div text will be 'good morning'.
I thought about a properties file, but I didn't figure out how to read it using the javascript and apply it to my web page.
Thanks in advance.