A recent challenge my teammates and I had involved a landing page with an unordered list with funky png bullet points. The page was entirely hard-coded, but the company we are working with wanted the ability to edit the text.
The team talked through possible challenges: How do we make sure the pink markers show up, what would be the easiest way to present the form to edit the page, etc.
I worked on this challenge by myself (working remotely).

What I did first was change the CSS to automate the bullets with the following code:
p.main-points {
background-image: image-url("svp_pin.png");
background-size: 50px;
background-position: left top;
background-repeat: no-repeat;
padding-left: 80px; /* Adjust according to image size to push text across. */
margin-bottom:30px;
min-height:55px;
}
In the html file, I added the main-points class to the paragraph tags. The min-height is there to ensure the entire bullet is visible, in case a particular point only has one line.
Second, I created a table in the database with a column for “main points.” That way, I could change that through a simple form, and also call the text via a rails skull_tag, ie
<%= @page.main_points %>
But how do we keep the bullet points for each point written? With the entire text in the main_points column, the section would read that as one big chunk, one big paragraph.
Enter simple_format.
<%= simple_format(@page.main_points, class:”main-points”) %>
All we had to do is make sure we keep a line break when editing the text in the textarea.

That guaranteed having separate <p> tags, as seen in the first screenshot.
