Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kanav_kapoor's avatar

Allow users to update HTML content?

Hi all. I've created many websites on Laravel and was not able to find any perfect solution allowing my clients to update their static contents by themself.

As an example, a client needed an e-commerce website. He also asked me to add a blog functionality.

So, i built frontend and backend/admin on Laravel. From backend he can add products, blog-posts etc that displays on his website dynamically .

Now there's some portion of the website that's static, and he needs to update it once in a while.

Like for header menu he need to update the links. The footer has 3 sections, left section contains a static paragraph, center section displays titles of recent-posts(means it's dynamic), and the right section contains his social-media icons like facebook, twitter etc.

I stored HTML content of those partials in a table, and fetched it in summer-note editor that provides the ability to update it. (See screenshot: https://d.pr/free/i/4nlr8y ). On frontend, these sections get fetched from database.

This solution works partially as it allows to add/update the text/links, but doesn't works well with images. Also, this doesn't look too elegant/complete to me. With editor, he can edit the link, but what if he what if he add another menu link? He needs to go to code-view of editor, add another div.

So, i'm wanted to know how to achieve this in the best way, something like wordpress post editor, allowing users to edit most of the content without digging much in the code

0 likes
2 replies
Sergiu17's avatar

what if he add another menu link?

Store menu in the database

kanav_kapoor's avatar

@Sergiu17

Not sure if was able to explain the question clearly, so here's a 40 seconds video on the problem: https://d.pr/free/v/THCluO

In the video, I wanted to add another link to the menu-bar. I added few space to an existing menu-link, and tried to add another link. But the editor was considering it as an extension of existing link. I then opened the "Code View" of editor, added another <li> and menu-link was added.

Is this possible using just the non-code view of editor?

I'm more curious to know how developers handle such content. I can surely add a database-table for menus and then create a form to add/edit/delete menus. I can add tables for all such sections of website. But as it's mostly static content, a WYSIWYG editor looks more elegant to me(like wordpress posts), but it's incomplete in some things, like i'm trying to achieve in the video.

Please or to participate in this conversation.