Skip to content

Commit

Permalink
add iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
tvd12 committed Apr 20, 2024
1 parent 7f08213 commit b3b45b0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/preset-webpage/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
18 changes: 18 additions & 0 deletions plugins/preset-webpage/src/components/basic-blocks/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,24 @@ export default function(editor, opts = {}) {
}
});

toAdd('embed') &&
bm.add('embed', {
label: `
<svg viewBox="0 0 24 24">
<path d="M14.6 16.6l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4m-5.2 0L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4z"></path>
</svg>
<div class="gjs-block-label">${editor.I18n.t('embed')}</div>`,
category: categoryName,
content: {
type: 'iframe',
src: 'img/video2.webm',
style: {
height: '315px',
width: '560px'
}
}
});

toAdd('map') &&
bm.add('map', {
label: `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default ezygrapes.plugins.add('gjs-blocks-basic', (editor, opts = {}) =>
'link',
'image',
'video',
'embed',
'map'
],
flexGrid: 0,
Expand Down
2 changes: 2 additions & 0 deletions plugins/preset-webpage/src/i18n/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const i18n = {
'link': 'Link',
'image': 'Image',
'video': 'Video',
'embed': 'Embed',
'map': 'Map',
'link_block': 'Link Block',
'quote': 'Quote',
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit b3b45b0

Please sign in to comment.