Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create predefined text if file doesn't exit #104

Open
osadasami opened this issue Jan 12, 2021 · 1 comment
Open

Create predefined text if file doesn't exit #104

osadasami opened this issue Jan 12, 2021 · 1 comment

Comments

@osadasami
Copy link

When we move our ready HTML markup to October CMS, we need to create all content files manually to allow clients to edit text

It's kind of pain because we need to do many thing

  1. Cut our text from HTML
  2. Create content file. content/hero/title.htm
  3. Paste our text to content file
  4. Paste content block {% component 'contenteditor' file="content/hero/title.htm" %}

It would be great if we can just write

{% component 'contenteditor' file="content/hero/title.htm" placeholder="Some initial text" fixture="h3" %}

And if content file doesn't exist, plugin will create that file with predefined text written in placeholder attribute and paste that text to tag written in fixture

In the result

content/hero/title.htm

<h3>Some initial text</h3>
@Samuell1
Copy link
Owner

Hey, thanks for good idea, i think this will be needed to move fixture to separate component to allow options like this and remove other issue when multiple fixtures are used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants