VS Code - How to continue on the next line? - html

everytime when I press enter to continue in the next line, VS Code jumps backs on the last line. I tried to put <br> at the end of the last line, but as you can see on the screenshot, that also doesn't help. I guess I have to change something within the settings of VS Code, but I didn't find anything.
Here and image
Here the whole code
Anybody an idea what I can do?

This is not an error. I didn't see the code that time as it was not opening sorry.
Just create a new p tag as And between it put br tag
This is not an error. you are using it wrongly.
<p>Hi und Willkommen auf SAWÖ.at!</p>
<br>
<p> Da du hier gelandet bist, hast du vermutlich dasselbe Problem, das wir einmal hatten: Du willst selbstständig als Webesigner und/
oder Developer arbeiten, weißt jedoch nicht, wie du im bürokratischen
Österreichden formellen Teil hinbekommst. Und du bist wahrscheinlich auch verwirrt, weil es da so viele verschiedene Fachbegriffe gibt wie zB Freiberufler, freie Berufe, Freelancer, Gewerbe usw... Keine Angst, jetzt ist Schluss mit dem Chaos! Wir erklärendir Step bei Step die wichtigsten Dinge, versprochen!</p>

Related

Which is the proper or best way to use i18n with many html tags on rails?

I have a code like that needs to be added to i18n, and I was wondering which would be the best/safest way to do it, For now I put it as is on i18n and called it on ruby code with a variable and html_safe, but I dont know if it implies any security danger, I also thought of passing the html tags as parameters of those i18n variables
<p>Através dos princípios da<strong> economia colaborativa </strong> e do <strong>
<span id="yellow">poder da tecnologia</span></strong> nosso modelo de negócio
alia a <strong> <span id="green"> expertise do executive search </span></strong>
<strong><span id="red">, a </span></strong>importância das relações humanas <strong> e o<span id="blue">alcance das redes</span>
You might want to have localized snippets for the whole thing instead (Rails Guides: Localized views):
spanish version in own file
# marketing.es.erb
<p>Através dos princípios da<strong> economia colaborativa </strong> e do <strong>
<span id="yellow">poder da tecnologia</span></strong> nosso modelo de negócio
alia a <strong> <span id="green"> expertise do executive search </span></strong>
<strong><span id="red">, a </span></strong>importância das relações humanas <strong> e o<span id="blue">alcance das redes</span>
and then the english one
# marketing.en.erb
<p>Something<strong> in english</strong>... <strong>
<span id="yellow">... </span></strong>
And automatically include the correct partial
(other content)
<%= render :marketing %>

Trouble in converting PCRE Regex to sed

I'm running into trouble on how to use a working PCRE regex in sed. I found a related topic, but unfortunately it's not working for me (I'm working on Linux not MacOS X if that should be necessary information).
I have some HTML code of which I need a special part - however not between the same tags. The regex I have is working according to some regex testing sites (like regex101 or regexr.com), however, when trying to use it on sed, it shows me the whole file instead of the wanted part.
My regex is:
/((<div id="main-content" class="wiki-content">)([\w\d\s\S]*))(<\/rdf:RDF>\n-->)/g
It grabs a part starting with the specific div and collects everything including the following RDF part.
The text I'm working with looks (with the interesting part - the rest around I cut due to length and also this part only appears once the file) as follows (inlcuding the gaps):
[...]
a href="#page-metadata-start" class="assistive">Go to start of metadata</a>
<div id="page-metadata-end" class="assistive"></div>
<div id="main-content" class="wiki-content">
<p><br/></p><p><br/></p><div class="panel conf-macro output-block" data-hasbody="true" data-macro-name="panel" style="border-color: #004237;border-width: 1px;"><div class="panelHeader" style="border-bottom-width: 1px;border-bottom-color: #004237;background-color: #004237;color: white;"><b>Inhalt</b></div><div class="panelContent">
<p> </p><div class="toc-macro client-side-toc-macro conf-macro output-block" data-hasbody="false" data-headerelements="H1,H2,H3,H4,H5,H6,H7" data-macro-name="toc"> </div><p> </p>
</div></div><h1 id="id-01-Dokumentation-1EinstiegindiePlanung">1 Einstieg in die Planung</h1><p><br/></p><h2 id="id-01-Dokumentation-1.1Startseite">1.1 Startseite</h2><p>Nach der Anmeldung im System findet sich der User auf der Startseite wieder. Von hier aus gelangt er zur "Planning Map".</p><p>Durch das Umschalten der Company auf die Counter Company kann der Planer die zuvor eingetragenen Werte kontrollieren. Diese erscheinen nach dem Umschalten in der zweiten<br/>Tabelle als negativer Wert auf dem gemappten IC Account.</p><p><br/></p><div class="table-wrap"><table class="wrapped confluenceTable"><colgroup><col/><col/><col/></colgroup><tbody><tr><th class="confluenceTh">Button</th><th class="confluenceTh">Aktion</th><th class="confluenceTh">Beschreibung</th></tr><tr><p>Alle Eintragungen werden auf der untersten Ebene (weißer Hintergrund) ausgeführt. Monate, die nicht mehr beplant werden können sind farblich hinterlegt. Ebenfalls farblich hinterlegt sind<br/>die Accounts, die hier nicht beplant werden können (IC / Capex und Rule belegte Accounts).</p><p><br/></p><div class="table-wrap"><table class="wrapped confluenceTable"><colgroup><col/><col/><col/></colgroup><tbody><tr><th class="confluenceTh">Button</th><th class="confluenceTh">Aktion</th><th class="confluenceTh">Beschreibung</th></tr><tr><td colspan="1" class="confluenceTd">Back</td><td colspan="1" class="confluenceTd">Sheet Wechsel</td><td colspan="1" class="confluenceTd">Zurück zum Sheet Planning Map</td></tr><tr><td colspan="1" class="confluenceTd">Refresh</td><td colspan="1" class="confluenceTd">Prozess ausführen</td><td colspan="1" class="confluenceTd">Sheet wird nochmals neu aufgebaut</td></tr></tbody></table></div>
</div>
<!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
<rdf:Description
rdf:about="https://confluence.example.org/confluence/display/KUN/01+-+Dokumentation"
dc:identifier="https://confluence.example.org/confluence/display/KUN/01+-+Dokumentation"
dc:title="01 - Dokumentation"
trackback:ping="https://confluence.example.org/confluence/rpc/trackback/47022143"/>
</rdf:RDF>
-->
[...]
So when I try this regex on the mentioned test websites, it marks the part I need (between <div id="main-content" class="wiki-content"> and </rdf:RDF>\n-->).
But when using sed -r '/((<div id="main-content" class="wiki-content">)([\w\d\s\S]*))(<\/rdf:RDF>\n-->)/g' testfile.txt it shows me the complete file content instead only the part I'm looking for (sed -E... produces the same).
I can't work out, where my problem is, so any help would be very much appreciated. Also, I'm not a professional regex user...
I'm not sure about how it will work in your case, as I need probably some more data, but this one could work for you:
sed -ne '/<div id="main-content" class="wiki-content">/,/-->/{p}' file.html

How to process JSON-deliverd HTML-text into formatted UITextView

I'm trying to create my first IOS app and run into problems when creating the view. The app shows info that I get from a JSON file. The JSON contains formatted text in HTML style. Within this html text there are one or more photos. In the app I want these photos to be shown above the text (each photo shown for some seconds). The photos are separate items in the JSON as well so I really don't need the reference in the HTML text. I want the photo and the text to be scrollable in case it does not fit on the screen.
I've tried the following: Removed the href tags from the HTML text and shown the text in a UIWebView. Above the text I showed the photos in a UIImageView. The text was scrollable instantly, but the photos weer always visible.
So now I think I should use UITextview. But how do I get the formatting that's in the HTML text transferred to a formatted UITextView? Or am I missing something?
The HTML text looks something like this:
<p>ik was de afgelopen dagen voor het eerst van mijn leven in de Duitse stad Keulen. Bepakt met een frisse blik zitten we nu in de ICE die ons terug brengt naar Amsterdam. Hoog tijd om die blik te delen!<br \/>\n<a href=\"http:\/\/www.blablablog.nl\/wp-content\/uploads\/IMG_8259.jpg\"><img src=\"http:\/\/www.blablablog.nl\/wp-content\/uploads\/IMG_8259.jpg\" alt=\"\"><\/a> <\/p>\n<p><b>De ICE<\/b><\/p>\n<p>Eerst maar ‘s beginnen met die hogesnelheidstrein. Hij stopt weinig en da’s een voordeel. De stoelen zitten lekker en er rijdt een bistrowagen mee, maar echt snelheid maken doet hij pas na Keulen dus als je net als ik onvoorbereid op dat moment wacht kom je bedrogen uit.<br \/>\n <a href=\"http:\/\/www.blablablog.nl\/wp-content\/uploads\/IMG_8248.jpg\"><img src=\"http:\/\/www.blablablog.nl\/wp-content\/uploads\/IMG_8248.jpg\" alt=\"\"><\/a> <\/p>\n<p><b>De inwoners<\/b>
You can just use UIWebView for that and initialize it with the html string. This way everything is taken care of automatically.
If you format the HTML properly you won't have issues with scrolling.

Can't delete the space and backgroundcolor in table

I'm trying to build a newsletter with tables. div boxes aren't working to 100 % percent in every mail client.
As you can see, here
is this what I prepared in Photoshop and I have some problems with the tables. How can I delete this space between the two images down and change the background color from the text ( in the middle of the pictures and the buttons ) to grey, if I'm giving it a new td ,then is nothing working. It should look like the pic I uploaded. would be very nice if you can help me out.
<td width="29"> </td>
<td width="291" valign="top">
<a target="_blank" href="#">
<img src="images/angebotbild1.jpg" style="display: block;" border="0" width="355" height="150"></a>
<div style="margin-top: 3px;"></div>
<font color="#778da7" face="Trebuchet, Arial, Verdana, Helvetica, sans-serif" size="2" style="font-size: 12px">
Wie gemacht für alle, die den etwas
anderen Sommer
erleben wollen: Diese Reise führt Sie zu den großen
Metropolen und kleinen Städten des Baltikums. Jede
davon wird Sie durch den Kontrast zwischen prunkvoller
Architektur in den historischen Stadtzentren und der
nachhaltigen in den neuen Arealen Bauweise faszinieren.
Jeder Ort erzählt hier seine eigene, spannende
Geschichte. Lassen Sie sich verzaubern.
</font>
<img border="0" src="images/button.jpg" width="335" height="60" style="display:block;" border="0" />
</td>
</tr>
</table>
jsfiddle
here is the complete code,
Change your style inside bottom a link from float:right to float:left
change img tag inside a link, and make the image width 355 instead of 335.
The bottom button is an image (button.jpg), you can only change it's background color by edit with photoshop, and don't forget to change its image size to 355px.
Next time please put your files in public area, we can not see what does it look right now and can only guess how it suppose to look like.
Since the OP answer seems to be covered already, here is an alternative output option for you for future use(s):
Rather than creating the tables yourself and manually working with the code, you can allow Photoshop to automate the process within the save for web option. This alternative allows you to save images as well as text so the text area you have in that section would simply be a slice type of No Image (Right Click with slice tool on a slice > Edit Slice Options). Now simply add the text right there within that selected slice.
When you save for web it will output a table with the images and text aligned properly. You can then clean up the text within the table with css to suit your needs.

Replace bbcode to HTML in PHP

For several weeks I learn a lot from this site.
Now I search for hours for a tip but can not find it and I decided to post a question.
I want an image from bbcode filter and a style as I add, but I do not know how to do this.
Who can tell me how can in chage this:
[attach=news-ZmAk6khfk0.jpg align=left title=title width=500 height=500 rel=rel]<br />
De formatie van Rutten creëerde in het eerste bedrijf geen uitgespeelde kansen. Vanuit de tweede lijn vielen een paar schoten te noteren. Dries Mertens en Tim Matavz hadden het vizier niet op scherp staan.
To this:
<img src=news-ZmAk6khfk0.jpg align=left title=title width=500 height=500 border=0 class=footblocks/>
Take a look at the PEAR package BBCode Parser 2. It's an excellent tool that will save you hours.
Edit: PECL also has one similar to the PEAR version: BBCode Parser