This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Fieldtype = { | |
mixins: [window.Storyblok.plugin], | |
template: `<div> | |
<sb-asset-selector :uid="uid" field="image"> | |
</sb-asset-selector> | |
<textarea v-model="model.content" id="mytextarea"> | |
</textarea> | |
</div>`, | |
methods: { | |
initWith() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Fieldtype = { | |
mixins: [window.Storyblok.plugin], | |
template: `<div> | |
<ul class="uk-list"> | |
<li :key="item.id" v-for="item in tree"> | |
<tree :category="item" :sub-categories="allCats" :categories.sync="model.categories"></tree> | |
</li> | |
</ul> | |
</div>`, | |
components: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Fieldtype = { | |
mixins: [window.Storyblok.plugin], | |
template: `<div class="image__wrap"> | |
<div class="uk-text-center uk-margin-small-bottom" v-if="validImage"> | |
<img :src="model.image" class="image" /> | |
</div> | |
<div class="uk-margin-small-bottom"> | |
<sb-asset-selector :uid="uid" field="image"> | |
</sb-asset-selector> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Fieldtype = { | |
mixins: [window.Storyblok.plugin], | |
template: `<div> | |
<select v-model="model.value"> | |
<option :key="tag.name" :value="tag.name" v-for="tag in tags">{{tag.name}}</option> | |
</select> | |
</div>`, | |
data() { | |
return { | |
tags: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Fieldtype = { | |
mixins: [window.Storyblok.plugin], | |
template: `<div class="uk-flex"> | |
<input class="uk-margin-right" v-model="model.color" type="color" /> | |
<input class="uk-width-1-1" v-model="model.color" /></div>`, | |
methods: { | |
initWith() { | |
return { | |
plugin: 'ef-native-color-picker', | |
color: '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const StoryblokClient = require('storyblok-js-client') | |
// Insert your oauth token and folder id | |
const Storyblok = new StoryblokClient({ | |
oauthToken: 'YOUR_OAUTH_TOKEN' | |
}) | |
const fieldToDelete = 'my_field' | |
const componentName = 'page' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const StoryblokClient = require('storyblok-js-client') | |
const Storyblok = new StoryblokClient({ | |
oauthToken: PROTECTED_VAR | |
}) | |
const sourceSpaceId = SOURCE_SPACE_ID | |
const targetSpaceId = TARGET_SPACE_ID | |
const Sync = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const StoryblokClient = require('storyblok-js-client') | |
const Storyblok = new StoryblokClient({ | |
oauthToken: PROTECTED_VAR | |
}) | |
const sourceSpaceId = SOURCE_SPACE_ID | |
const targetSpaceId = TARGET_SPACE_ID | |
const Sync = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Fieldtype = { | |
mixins: [window.Storyblok.plugin], | |
template: `<div> | |
<div v-if="modalOpen" style="height: 800px"> | |
<a class="uk-button uk-display-block" @click="closeModal">Close</a> | |
</div> | |
<a v-else class="uk-button uk-display-block" @click="openCloudinary">Select image</a> | |
</div>`, | |
data() { | |
return { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Fieldtype = { | |
mixins: [window.Storyblok.plugin], | |
template: `<div> | |
<h4>Padding</h4> | |
<div class="uk-grid uk-margin-bottom" v-if="isReady"> | |
<div class="uk-width-1-2"> | |
Top | |
<select v-model="model.normal.top" class="uk-width-1-1"> | |
<option v-for="item in options" :value="item" :key="item.id">{{ item.name }}</option> | |
</select> |