From b3b45b03ac6962646019f443b784b7b0a0a94cd4 Mon Sep 17 00:00:00 2001 From: Dung Ta Van Date: Sat, 20 Apr 2024 11:52:28 +0700 Subject: [PATCH] add iframe --- plugins/preset-webpage/package.json | 2 +- .../src/components/basic-blocks/blocks.js | 18 ++++++++++++++++++ .../src/components/basic-blocks/index.js | 1 + plugins/preset-webpage/src/i18n/index.js | 2 ++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/plugins/preset-webpage/package.json b/plugins/preset-webpage/package.json index ea13ba461e..119ac9d2b0 100644 --- a/plugins/preset-webpage/package.json +++ b/plugins/preset-webpage/package.json @@ -1,6 +1,6 @@ { "name": "ezygrapes-preset-webpage", - "version": "0.0.48", + "version": "0.0.50", "description": "Ezygrapes default editor plugin", "main": "dist/ezygrapes-preset-webpage.min.js", "scripts": { diff --git a/plugins/preset-webpage/src/components/basic-blocks/blocks.js b/plugins/preset-webpage/src/components/basic-blocks/blocks.js index 87fcbbc27a..9920997273 100644 --- a/plugins/preset-webpage/src/components/basic-blocks/blocks.js +++ b/plugins/preset-webpage/src/components/basic-blocks/blocks.js @@ -288,6 +288,24 @@ export default function(editor, opts = {}) { } }); + toAdd('embed') && + bm.add('embed', { + label: ` + + + +
${editor.I18n.t('embed')}
`, + category: categoryName, + content: { + type: 'iframe', + src: 'img/video2.webm', + style: { + height: '315px', + width: '560px' + } + } + }); + toAdd('map') && bm.add('map', { label: ` diff --git a/plugins/preset-webpage/src/components/basic-blocks/index.js b/plugins/preset-webpage/src/components/basic-blocks/index.js index d00cfd031a..34083d4582 100644 --- a/plugins/preset-webpage/src/components/basic-blocks/index.js +++ b/plugins/preset-webpage/src/components/basic-blocks/index.js @@ -12,6 +12,7 @@ export default ezygrapes.plugins.add('gjs-blocks-basic', (editor, opts = {}) => 'link', 'image', 'video', + 'embed', 'map' ], flexGrid: 0, diff --git a/plugins/preset-webpage/src/i18n/index.js b/plugins/preset-webpage/src/i18n/index.js index 8309c177bb..b68b052b17 100644 --- a/plugins/preset-webpage/src/i18n/index.js +++ b/plugins/preset-webpage/src/i18n/index.js @@ -11,6 +11,7 @@ const i18n = { 'link': 'Link', 'image': 'Image', 'video': 'Video', + 'embed': 'Embed', 'map': 'Map', 'link_block': 'Link Block', 'quote': 'Quote', @@ -62,6 +63,7 @@ const i18n = { 'link': 'Đường dẫn', 'image': 'Ảnh', 'video': 'Video', + 'embed': 'Nhúng', 'map': 'Bản đồ', 'link_block': 'Khối đường dẫn', 'quote': 'Trích dẫn',