Add button block
This commit is contained in:
parent
1cb252b952
commit
7639ed84b3
18
dist/block-renderer.common.js
vendored
18
dist/block-renderer.common.js
vendored
|
@ -2415,12 +2415,12 @@ var component = normalizeComponent(
|
||||||
)
|
)
|
||||||
|
|
||||||
/* harmony default export */ var AttachesBlock = (component.exports);
|
/* harmony default export */ var AttachesBlock = (component.exports);
|
||||||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"b6a10a42-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/EmbedBlock.vue?vue&type=template&id=e6a17b8a&
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"b6a10a42-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/EmbedBlock.vue?vue&type=template&id=fa9ca340&
|
||||||
var EmbedBlockvue_type_template_id_e6a17b8a_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('figure',[_c('iframe',{staticClass:"w-full",attrs:{"src":_vm.data.embed,"height":_vm.data.height,"frameborder":"0","allowfullscreen":""}}),_c('figcaption',{domProps:{"innerHTML":_vm._s(_vm.data.caption)}})])}
|
var EmbedBlockvue_type_template_id_fa9ca340_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('figure',[_c('iframe',{staticClass:"w-full",attrs:{"src":_vm.data.embed,"height":_vm.data.height,"frameborder":"0","allowfullscreen":""}}),_c('figcaption',{domProps:{"innerHTML":_vm._s(_vm.data.caption)}})])}
|
||||||
var EmbedBlockvue_type_template_id_e6a17b8a_staticRenderFns = []
|
var EmbedBlockvue_type_template_id_fa9ca340_staticRenderFns = []
|
||||||
|
|
||||||
|
|
||||||
// CONCATENATED MODULE: ./src/components/EmbedBlock.vue?vue&type=template&id=e6a17b8a&
|
// CONCATENATED MODULE: ./src/components/EmbedBlock.vue?vue&type=template&id=fa9ca340&
|
||||||
|
|
||||||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/EmbedBlock.vue?vue&type=script&lang=js&
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/EmbedBlock.vue?vue&type=script&lang=js&
|
||||||
//
|
//
|
||||||
|
@ -2431,6 +2431,12 @@ var EmbedBlockvue_type_template_id_e6a17b8a_staticRenderFns = []
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
/* harmony default export */ var EmbedBlockvue_type_script_lang_js_ = ({
|
/* harmony default export */ var EmbedBlockvue_type_script_lang_js_ = ({
|
||||||
props: ["data"]
|
props: ["data"]
|
||||||
});
|
});
|
||||||
|
@ -2446,8 +2452,8 @@ var EmbedBlockvue_type_template_id_e6a17b8a_staticRenderFns = []
|
||||||
|
|
||||||
var EmbedBlock_component = normalizeComponent(
|
var EmbedBlock_component = normalizeComponent(
|
||||||
components_EmbedBlockvue_type_script_lang_js_,
|
components_EmbedBlockvue_type_script_lang_js_,
|
||||||
EmbedBlockvue_type_template_id_e6a17b8a_render,
|
EmbedBlockvue_type_template_id_fa9ca340_render,
|
||||||
EmbedBlockvue_type_template_id_e6a17b8a_staticRenderFns,
|
EmbedBlockvue_type_template_id_fa9ca340_staticRenderFns,
|
||||||
false,
|
false,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
|
2
dist/block-renderer.common.js.map
vendored
2
dist/block-renderer.common.js.map
vendored
File diff suppressed because one or more lines are too long
18
dist/block-renderer.umd.js
vendored
18
dist/block-renderer.umd.js
vendored
|
@ -2424,12 +2424,12 @@ var component = normalizeComponent(
|
||||||
)
|
)
|
||||||
|
|
||||||
/* harmony default export */ var AttachesBlock = (component.exports);
|
/* harmony default export */ var AttachesBlock = (component.exports);
|
||||||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"b6a10a42-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/EmbedBlock.vue?vue&type=template&id=e6a17b8a&
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"b6a10a42-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/EmbedBlock.vue?vue&type=template&id=fa9ca340&
|
||||||
var EmbedBlockvue_type_template_id_e6a17b8a_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('figure',[_c('iframe',{staticClass:"w-full",attrs:{"src":_vm.data.embed,"height":_vm.data.height,"frameborder":"0","allowfullscreen":""}}),_c('figcaption',{domProps:{"innerHTML":_vm._s(_vm.data.caption)}})])}
|
var EmbedBlockvue_type_template_id_fa9ca340_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('figure',[_c('iframe',{staticClass:"w-full",attrs:{"src":_vm.data.embed,"height":_vm.data.height,"frameborder":"0","allowfullscreen":""}}),_c('figcaption',{domProps:{"innerHTML":_vm._s(_vm.data.caption)}})])}
|
||||||
var EmbedBlockvue_type_template_id_e6a17b8a_staticRenderFns = []
|
var EmbedBlockvue_type_template_id_fa9ca340_staticRenderFns = []
|
||||||
|
|
||||||
|
|
||||||
// CONCATENATED MODULE: ./src/components/EmbedBlock.vue?vue&type=template&id=e6a17b8a&
|
// CONCATENATED MODULE: ./src/components/EmbedBlock.vue?vue&type=template&id=fa9ca340&
|
||||||
|
|
||||||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/EmbedBlock.vue?vue&type=script&lang=js&
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/EmbedBlock.vue?vue&type=script&lang=js&
|
||||||
//
|
//
|
||||||
|
@ -2440,6 +2440,12 @@ var EmbedBlockvue_type_template_id_e6a17b8a_staticRenderFns = []
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
/* harmony default export */ var EmbedBlockvue_type_script_lang_js_ = ({
|
/* harmony default export */ var EmbedBlockvue_type_script_lang_js_ = ({
|
||||||
props: ["data"]
|
props: ["data"]
|
||||||
});
|
});
|
||||||
|
@ -2455,8 +2461,8 @@ var EmbedBlockvue_type_template_id_e6a17b8a_staticRenderFns = []
|
||||||
|
|
||||||
var EmbedBlock_component = normalizeComponent(
|
var EmbedBlock_component = normalizeComponent(
|
||||||
components_EmbedBlockvue_type_script_lang_js_,
|
components_EmbedBlockvue_type_script_lang_js_,
|
||||||
EmbedBlockvue_type_template_id_e6a17b8a_render,
|
EmbedBlockvue_type_template_id_fa9ca340_render,
|
||||||
EmbedBlockvue_type_template_id_e6a17b8a_staticRenderFns,
|
EmbedBlockvue_type_template_id_fa9ca340_staticRenderFns,
|
||||||
false,
|
false,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
|
2
dist/block-renderer.umd.js.map
vendored
2
dist/block-renderer.umd.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/block-renderer.umd.min.js.map
vendored
2
dist/block-renderer.umd.min.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "block-renderer",
|
"name": "block-renderer",
|
||||||
"description": "Content renderer for JSON blocks from Editor.js",
|
"description": "Content renderer for JSON blocks from Editor.js",
|
||||||
"version": "0.1.13",
|
"version": "0.1.14",
|
||||||
"author": "KingOfDog <info@kingofdog.de>",
|
"author": "KingOfDog <info@kingofdog.de>",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
14
src/components/ButtonBlock.vue
Normal file
14
src/components/ButtonBlock.vue
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: ["data"],
|
||||||
|
render(createElement) {
|
||||||
|
return createElement("a", {
|
||||||
|
domProps: {
|
||||||
|
innerHTML: this.data.label,
|
||||||
|
href: this.data.url
|
||||||
|
},
|
||||||
|
class: ["button", "button-primary"]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -1,6 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<figure>
|
<figure>
|
||||||
<iframe :src="data.embed" :height="data.height" frameborder="0" allowfullscreen class="w-full"></iframe>
|
<iframe
|
||||||
|
:src="data.embed"
|
||||||
|
:height="data.height"
|
||||||
|
frameborder="0"
|
||||||
|
allowfullscreen
|
||||||
|
class="w-full"
|
||||||
|
></iframe>
|
||||||
|
|
||||||
<figcaption v-html="data.caption"></figcaption>
|
<figcaption v-html="data.caption"></figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
|
@ -8,9 +14,6 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: ["data"],
|
props: ["data"]
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
|
||||||
</style>
|
|
|
@ -5,7 +5,11 @@ export default {
|
||||||
return createElement(
|
return createElement(
|
||||||
this.data.style === "ordered" ? "ol" : "ul",
|
this.data.style === "ordered" ? "ol" : "ul",
|
||||||
this.data.items.map(item =>
|
this.data.items.map(item =>
|
||||||
createElement("li", { domProps: { innerHTML: item } })
|
createElement("li", {
|
||||||
|
domProps: {
|
||||||
|
innerHTML: item
|
||||||
|
}
|
||||||
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user