robertk199752076
robertk199752076

So I downloaded the gutenberg plugin a while back and my formatting has always been garbage. Nothing looks right unless i'm inside of the blog post editor itself. See, the plugin is already pre-implemented with Rainlab blog and a couple other things. So it works that way (in the back end), but when it comes to the front end, it loses most of its formatting. So I found out I was missing the css file that was required, but that only fixed a few things. Anyone have any idea what to do here?

In the documentation it says this -

====

Usage

This plugin works only by implementing Gutenberg behavior in your model. It will create morphOne relation with Gutenberg\Content model.

Go to your model and add behavior in $implement array:

public $implement = ['ReaZzon.Gutenberg.Behaviors.Gutenbergable'];

After you need to add behavior to $implement array in your model controller.

public $implement = ['ReaZzon.Gutenberg.Behaviors.GutenbergController'];

Done. Your model now has morphOne with Gutenberg\Content Model by content field that renders only on created model page. Rendering

Rendering examples below.

{{ post.content.render }}

$post->content->render();

In order to correctly display Gutenberg styles. You must add laraberg public styles to your page:

<link href="/plugins/reazzon/gutenberg/assets/laraberg.min.css" rel="stylesheet">

====

I haven't done the public implement part, I figured its already implemented with Rainlab blog, unless Im missing something here. Also he says to simply add that to "the model" but what model? Im still new to this stuff so I need a bit of help understanding what is meant.

Link to original gutenberg docs - https://github.com/FlusherDock1/Gutenberg

Link to sample post - https://nationaldossier.com/blog/post/07282020-general-website-updates-tips No spaces are saved, no indents or line spacing, looks nothing like the backend preview.

Last updated

1-1 of 1