massenergize / frontend-portal

Front End Code for the MassEnergize Community Portal. The community portal is customized for each participating community, and has the canonical URL https://community.massenergize.org/<community-name>/. For example, https://community.massenergize.org/wayland/.
MIT License
5 stars 2 forks source link

Update styles so HTML looks same on User portal and HTML edit window #1236

Open BradHN1 opened 1 year ago

BradHN1 commented 1 year ago

Similar to Admin issue 1007, eliminate inconsistencies between the HTML format and the text that shows up on the user portal. One example of this is paragraph spacing on Action description text, as shown in the HTML for Action #9 on prod (Energizewayland.org, Action "Heat My Water with Solar!"). In order to get a space between paragraphs on the portal, you need to hit return twice in the HTML editor, which makes the following HTML in the database:

<p><strong>How it works.</strong> A solar hot water system captures heat from sunlight and circulates the thermal energy to your water tank. Solar hot water systems reduce the use of fossil fuels. They do not fully replace conventional water heaters, but can provide up to 80% of a building’s total hot water needs. See how it works <a href="https://www.masscec.com/learn-about-solar-hot-water" target="_blank" style="">here</a>.</p>
<p><br></p>
<p>These systems are passive and therefore practically <strong>maintenance and hassle-free</strong> and keep on working for decades.&nbsp;</p>
<p><br></p>
<p><strong>Incentives. </strong>Solar tax credits, Alternative Energy Certificates and generous rebates are available, with higher incentives for low- and moderate-income customers. Incentives typically cover 60-80% of the system cost.</p>
<p><br></p>
<p><strong>We have partnered with</strong> <a href="http://neshw.com/" target="_blank" style="">New England Solar Hot Water</a> (NESHW). Their “New England Drain Back” system consists of the solar collectors on the roof, the storage tank inside your home, pump and controls, and an insulated line set that runs between the solar collectors and the storage tank. Installation usually takes a day.&nbsp;</p>
<p><br></p>
<p>Energize Wayland receives no money from New England Solar Hot Water. A customer already? Used another installer? Let us know how they did by leaving a Testimonial here, or emailing us at info@energizewayland.org.</p>

Note the <p><br></p> between paragraphs. This should not be required, if the paragraph style is consistent in the HTML editor and the community portal.

BradHN1 commented 1 year ago

@abdullai-t - From testing on dev, I can see this isn't working entirely, and I want to change one thing: When a user edits content in the rich text editor and hits , that should end a paragraph and add a vertical space between paragraphs, which should show up on the portal the same as it shows up in the editor. If I understood correctly the change you made, I think you tried to make it so that in the editor it doesn't add that space, but we want the space, in order to make it as easy as possible. When it works properly we can remove the text above the editor starting with "PLEASE NOTE".