Change replace and exclude multiline html code - html

Looking for a bit of help.
After completing hundreds of pages, I came across an HTML error.
Need simply to move the /h1> closing tag to reside before the p> tag
Is it possible with notepad++ or other, to find these 6 lines and replace the /h1> tag from line 6 to the end of the second line?
Appreciate the help, if it's possible, as it will save a lot of work replacing it individually on all my pages.
Code is; tab delimited.
Note: The title and paragraph are never the same.
Find:
<h1 id="h-title">
Estatus rogue
<p>ext 098 float
<br>
</p>
</h1>
Replace with:
<h1 id="h-title">
Estatus rogue</h1>
<p>ext 098 float
<br>
</p>
In advance all my appreciation for your help

Try downloading/using Visual Studio Code Community and doing a find and replace in multiple files
Here's a link to someone else who has done this.

Related

Formatting paragraphs with Django and html

I am makeing a blog with django and i have a problom. when ever i write sevral pargraphs into my form and then print the modle on to the html page the two paragraphs gt mushed into one. If anyone knows how i can keep the paragrphs spreat that would be much appricated
You need to wrap the paragraphs in HTML paragraph elements.
For example:
<p> Paragraph one </p>
<p> Paragraph two </p>
I'd recommend this YouTube series if you want to learn more about how to write HTML and CSS.

Xpath to get only first text tag and ignore break tag before it

I checked for similar questions and but I couldn't find answer for mine.
I need to collect the text value comes inside a h1 tag, as per the example value "text1", which comes in 3 different situation. I am sharing all 3 html codes below:
First Case:
<h1 class="h1">
text1
<br>
<span>text2</span>
</h1>
Second Case:
<h1 class="h1">
<span>text1</span>
</h1>
Third Case:
<h1 class="h1">
<br>
text1
<span>text2</span>
</h1>
I used the xpath
//h1[#class="h1"]/text()[1]|//h1[#class="h1"]/span[1]
But it select the <br> tag in the third case. Is there anyway, I can ignore the break tag and get the text1 value in all 3 cases?
Try this:
//h1/descendant-or-self::text()[normalize-space()][1]
It selects the first descending text node of h1 that is not empty or contains only whitespace.

My images code does not working in Visual Studio 2019

I am a newbie in coding and I try to find out what makes my HTML images idle?
Can you have a look for this?
<p> My Most Favorite Plantnete - Uranus
img src "Uranus2.png" alt "Uranus" id "Pic3"
</p>
You need to edit this into:
<p>My Most Favorite Planet - Uranus
<img src="Uranus2.png" alt="Uranus" id="Pic3">
</p>

Drupal 8.2.x text editor stripping-removing "div classes"

I have a problem with Druapl 8.2.1 text editor and CKeditor, system keeps stripping - removing classes from "
And example of this:
<div class="social clearfix"> </div>
System renders:
<div> </div>
I can't configure the allowed elements, that was only possible in previous versions (config.allowedContent = true;)
Any help would be greatly appreciated
Ok, well after breaking my head thinking and re thinking in all I have already done I just did what it was left to do.
Since there is no way to modify the allowedContent in Drupal version 8.2.x... what I did before it was to create a "New text format and editor" but I had selected the option "Limit allowed HTML tags and correct faulty HTML" and in the allowed HTML tags field I had all the classes I wanted to be accepted:
<div> <div class> <div id><a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <p> <br> <span>...
I just unchecked the "Limit allowed HTML tags and correct faulty HTML" and keep the "Correct faulty and chopped off HTML" option checked, saved and voila!!
Now Drupal keeps all my div classes.
Take into consideration that in the option "Text editor" I had selected "NONE", it do not work if "CKEditor" is selected.
:)

How to put hyperlink on same line?

I was just wondering how to put a hyperlink after the text:
If you require any further information on PCSE, please visit the FAQ section of the PCSE website.- (HYPERLINK HERE)
<div class="panel-body">
<p>If you require any further information on PCSE, please visit the FAQ section of the PCSE website.-</p>
</div>
Thanks
You are ending the <p> and then adding the <a>. If you include the <a> in the <p>, it should be fine.
<div class="panel-body">
<p>If you require any further information on PCSE, please visit the FAQ section of the PCSE website.- </p>
</div>
Well, if div was big enought, it shouldnt break from starts.
Next, dont use "-". Dash character is used to break the line
Instear, use a non breaking char : ‑
You need to put the <a></a> tag inside the <p>...</p> tag.
In your case the solution would look like:
<div class="panel-body">
<p>
If you require any further information on PCSE, please visit the FAQ section of the PCSE website.-
</p>
</div>