Reimplement preview styles, add frame flag, clean up markdown editor options

This commit is contained in:
Daniel Lautzenheiser
2022-10-26 14:55:26 -04:00
parent e36698aa9a
commit 3486005244
28 changed files with 421 additions and 1213 deletions

View File

@ -61,6 +61,8 @@ collections:
label: FAQ
folder: _faqs
create: true
editor:
frame: false
fields:
- label: Question
name: title

View File

@ -40,11 +40,7 @@ const GeneralPreview = createClass({
h('dd', {}, this.props.widgetsFor('posts').data.author || 'None'),
h('dt', {}, 'Default Thumbnail'),
h(
'dd',
{},
thumb && h('img', { src: this.props.getAsset(thumb).toString() }),
),
h('dd', {}, thumb && h('img', { src: this.props.getAsset(thumb).toString() })),
),
);
},
@ -92,6 +88,7 @@ const RelationKitchenSinkPostPreview = createClass({
},
});
CMS.registerPreviewStyle('.toastui-editor-contents h1 { color: blue }', { raw: true });
CMS.registerPreviewTemplate('posts', PostPreview);
CMS.registerPreviewTemplate('general', GeneralPreview);
CMS.registerPreviewTemplate('authors', AuthorsPreview);