gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Excerpts as they are seen in a post preview.

Open paaljoachim opened this issue 9 years ago • 11 comments

A thought...

On a few of my sites I use a styled excerpt as part of the post preview on the front page. I have added some code to add TinyMCE to the excerpts meta box so that I can make it a little nicer. Here is an example in Norwegian. The word Utdrag is the same as Excerpt.

screen shot 2017-06-20 at 00 46 42

When I go to the front page and look at the styling of the excerpt this is what I see:

screen shot 2017-06-20 at 00 48 35

Having a simple way to style the contents of the excerpt box directly would be of help or else it would just show up as a block of text.

paaljoachim avatar Jun 20 '17 04:06 paaljoachim

I think we'll want an excerpt block to exist.

mtias avatar Jun 22 '17 10:06 mtias

That is a very good idea!

paaljoachim avatar Jun 22 '17 15:06 paaljoachim

Would excerpt block be locked to the first position in the editor once it is inserted?

westonruter avatar Jun 23 '17 01:06 westonruter

@westonruter most likely, yes, and it wouldn't get the "mover" controls.

mtias avatar Jun 23 '17 11:06 mtias

Should it be something you add via the popup - It would make sense to limit to only be added once, and then disable/fade it in the popup.

On that note, such a feature would be nice in general for the API so third-party plugins could introduce blocks that have a specific limit to the amount of times it can be added to the editor.

paulwilde avatar Jun 23 '17 12:06 paulwilde

@mtias also I presume that the Excerpt's block contents should get stored in the excerpt field of the post (the post_excerpt DB field) as opposed to being inline in the post_content, right?

westonruter avatar Jun 23 '17 22:06 westonruter

@westonruter yes, correct. I had an issue for similar handling of featured images too.

mtias avatar Jun 26 '17 18:06 mtias

I don't think that's a good idea to lock the excerpt or other "meta box" like fields in place on top of the editor.

As some of my projects are made so 50+ users can publish, it's already hard enough to teach the frontend and backend method to create and view content. Thinking about telling them that they should ignore the first few "locked" blocks, because they will not appear in the frontend in that place anyway just cause them and me headaches. Having the excerpt metabox and other below the current wp-editor allows to teach something like: "And in this boxes all the other notes and related information need to be entered.".

Not mixing the main blocks and other blocks (excerpt-block) in one column/interface-part is very important for people which can not abstract as well as we (techy) web people/devs.

IMHO: If Gutenbergs goal is to provide a better interface to edit visible content, maybe it should become an frontend editor. So the wp_content or sidebar can be replaced with there own Gutenberg instances. Plus an area (customizer like) that allows to edit "invisible" meta data.

Drivingralle avatar Jul 16 '17 11:07 Drivingralle

I think it is totally fine where it is located right now as part of the Document settings. But then we need a way to add various styling to it. It could actually behave like a block but inside the Document setting.

paaljoachim avatar Aug 04 '17 21:08 paaljoachim

Here is some semi styling of the excerpts box:

gutenberg-semi-styling-excerpts

One should also have the chance to use a heading in it as well.

paaljoachim avatar Aug 18 '17 23:08 paaljoachim

This is a good one for looking at after the editing phase is done.

mtias avatar Nov 20 '17 10:11 mtias