mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
✨ Added snippets feature to editor
no issue Snippets are pieces of saved content that are given a name and made available for easy and quick insertion when editing posts or pages. They can contain rich text, cards, or a combination of both making it faster and less error-prone to re-use pieces of content across multiple posts. Snippet length is not constrained meaning they can also stand in as post type templates alleviating the need to keep drafts around as templates and copy/pasting each time they are used. Feature changes: - added "create snippet" icon to selection and card toolbars - added "Snippets" section to the plus and slash menus - for the slash menu, continuing to type after opening the menu will filter by snippet name - all saved snippets are available to all staff users - snippets can be deleted by clicking the trash can icon when hovering the mouse over a snippet entry in the plus or slash menus - creation/deletion of snippets is available to staff users with the owner, admin, or editor role This commit: - removed developer experiments guard around snippet UI
This commit is contained in:
parent
581b195e12
commit
1e639c2504
@ -38,7 +38,7 @@
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
||||
{{#if (and this.saveAsSnippet (enable-developer-experiments))}}
|
||||
{{#if this.saveAsSnippet}}
|
||||
{{#if this.toolbar.items}}
|
||||
<li class="ma0 lh-solid kg-action-bar-divider bg-darkgrey-l2 h5" role="separator"></li>
|
||||
{{/if}}
|
||||
|
@ -44,8 +44,7 @@ export default Component.extend({
|
||||
let snippetsSection = {
|
||||
title: 'Snippets',
|
||||
items: [],
|
||||
rowLength: 1,
|
||||
developerExperiment: true
|
||||
rowLength: 1
|
||||
};
|
||||
|
||||
snippets.forEach((snippet) => {
|
||||
|
@ -63,8 +63,7 @@ export default class KoenigSlashMenuComponent extends Component {
|
||||
let snippetsSection = {
|
||||
title: 'Snippets',
|
||||
items: [],
|
||||
rowLength: 1,
|
||||
developerExperiment: true
|
||||
rowLength: 1
|
||||
};
|
||||
|
||||
snippets.forEach((snippet) => {
|
||||
|
@ -67,7 +67,7 @@
|
||||
</button>
|
||||
</li>
|
||||
|
||||
{{#if (and @addSnippet (enable-developer-experiments))}}
|
||||
{{#if @addSnippet}}
|
||||
{{#unless this.basicOnly}}
|
||||
<li class="ma0 lh-solid kg-action-bar-divider bg-darkgrey-l2 h5" role="separator"></li>
|
||||
<li class="ma0 lh-solid">
|
||||
|
Loading…
Reference in New Issue
Block a user