ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > RocketCake
forum topic indicator New html page text in <div> element want in <p> element
person icon
jimsteele
Registered User
Quote
2024-06-12 05:31:28

When I add a new page and type text I find looking at the html it is contained in a <div> element. How can I change so the text is in a paragraph element?

person icon
niko
Moderator
Quote
2024-06-12 08:19:27

It uses div and span elements by default. If you really want, you can insert paragraph elements using the HTML Code element (uncheck the "create div around code") option. But what would be the advantage for this?

person icon
jimsteele
Registered User
Quote
2024-06-12 17:59:04

To be honest I am not certain there is an advantage to using the <p> over <div> other than it is considered a best practice to use the paragraph element for text that is a paragraph.

I thought because my html file did not use the <p> tag that might be why when loaded into the container it did not word wrap. That was not the case, I edited the file in notepad and reran on the server, same results.

person icon
martin
Registered User
Quote
2025-06-23 14:16:34

Well, managing HTML Code elements or Containers (<div>) quickly becomes a click-fest and unpractical if you have more than a few paragraphs.

Consider that every Container comes with it's own settings, including non-zero padding and a MinHeight of 150. That means the default container will add 10px horizontal inset to each paragraph.

Pressing Enter currently inserts a <br> line break, which does not have visually pleasing margins: a single <br> adds no vertical space which looks too dense and with two consecutive <br> the spacing is often too wide.

How about something practical that is easy to enter:
* Insert a <p> when user presses Ctrl+Enter.
* Display it with a special character if "Show invisible characters" is enabled.
* Let us configure <p> styling in the parent container.

Alternatively to Ctrl+Enter you could convert two consecutive Enters into a <p> instead of two <br>, but that probably needs to be tested for practicality and edge-cases.

My 2ct: The current way of doing things (<br> only) gives quick results but if you need something more refined with a professional look it's quite a hassle.


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |