I am creating a blog-app project in Angular 7. Using firebase cloud functions as a backend and doing CRUD operations by saving html content to firebase using Angular - CKEditor component.
It looks like this in firebase
content: "<p>Sample Blog Post</p><img src="someLink">"
and then I render that string in the page
<div [innerHTML]="content"></div>
I think this approach called WYSIWYG(What You See Is What You Get) and works perfectly fine but I feel like this is not the efficient way.
I wanna have a blog website with just blog posts no other features. Is there any problem with that approach for my case ? Can you recommend any other solution if there is a problem ?
Thank you.
There's absolutely nothing wrong with your approach of saving HTML to a database.
In fact, that's how Wordpress works.
FYI, "WYSIWYG (What You See Is What You Get)" typically applies to things like editors:
https://en.wikipedia.org/wiki/WYSIWYG
WYSIWYG (/ˈwɪziwɪɡ/ WIZ-ee-wig)[1] is an acronym for "what you see is what you get". In computing, a WYSIWYG editor is a system in which content (text and graphics) can be edited in a form closely resembling its appearance when printed or displayed as a finished product,[2] such as a printed document, web page, or slide presentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With