Closed herbdool closed 2 months ago
@laryn I've got a PR for this. It was fairly easy to implement, borrowing from ckeditor module. The rest is up to the site builder.
Perhaps a section could be put into the wiki if this is accepted.
Nice idea, I like this @herbdool.
@laryn thanks. And it won't impact anything else. It only includes the css file if the themer included it intentionally.
@herbdool I've merged this.
If someone is using the paragraphs preview, there is no easy way for most site builders to add some css that will show up when editing content. I tend to have the paragraphs display the content preview. I'm including a separate css stylesheet with the
hook_field_widget_form_alter()
. The stylesheet can live in the default theme and it will be inserted when editing the node. Looks like:But...it might be nice to allow someone to include a line in the theme.info file like what is done with ckeditor:
paragraphs_stylesheets[] = css/paragraphs-style.css
.UPDATE: the PR does provide what CKEditor does. It will only attempt to include a stylesheet if it exists, that is, added with a
paragraphs_stylesheets[]
entry in the theme.info
file.