ctreffe / alfred

Alfred - A library for rapid experiment development
MIT License
10 stars 1 forks source link

TextElement: Replace <p> with <div> to avoid problems with text formatting #48

Closed ctreffe closed 4 years ago

ctreffe commented 4 years ago

Currently, the content of a TextElement is placed within a HTML paragraph. This causes problems with text formatting when using HTML table or list elements as these elements are not allowed within paragraphs. If users add a table or list to a TextElement, it will be placed outside the paragraph together with all following content. Since our CSS rules are applied to the paragraph, they only apply to a part of the content in these cases.

To avoid the described problem in the future, I propose that we replace the paragraph in TextElement with a div section. The CSS rules for this div section need to be adjusted to include a new bottom padding or margin to fulfill the paragraph's intended purpose which was to provide adequate spacing between elements. We should also check if the css settings need additional refinement.

ctreffe commented 4 years ago

Solved