feat: added support to embed aparat
This commit is contained in:
@@ -167,6 +167,7 @@ export function getEditorTools() {
|
||||
youtube: true,
|
||||
vimeo: true,
|
||||
codepen: true,
|
||||
aparat: true,
|
||||
slides: {
|
||||
regex: /https:\/\/docs\.google\.com\/presentation\/d\/e\/([A-Za-z0-9_-]+)\/pub/,
|
||||
embedUrl:
|
||||
@@ -179,20 +180,6 @@ export function getEditorTools() {
|
||||
}
|
||||
}
|
||||
|
||||
function getVideoBlockHtml(medium) {
|
||||
let regex
|
||||
if (medium === 'youtube') {
|
||||
regex =
|
||||
/(?:https?:\/\/)?(?:www\.)?(?:(?:youtu\.be\/)|(?:youtube\.com)\/(?:v\/|u\/\w\/|embed\/|watch))(?:(?:\?v=)?([^#&?=]*))?((?:[?&]\w*=\w*)*)/
|
||||
regex.exec(url)?.slice(1)
|
||||
}
|
||||
const wrapper = document.createElement('div')
|
||||
const app = createApp(VideoBlock, {
|
||||
file: file.file_url,
|
||||
})
|
||||
app.mount(wrapper)
|
||||
}
|
||||
|
||||
export function getTimezones() {
|
||||
return [
|
||||
'Pacific/Midway',
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<meta name="twitter:title" content="{{ meta.title }}" />
|
||||
<meta name="twitter:image" content="{{ meta.image }}" />
|
||||
<meta name="twitter:description" content="{{ meta.description }}" />
|
||||
<script type="module" crossorigin src="/assets/lms/frontend/assets/index-HOvpvn4K.js"></script>
|
||||
<script type="module" crossorigin src="/assets/lms/frontend/assets/index-Cjguiv45.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/lms/frontend/assets/frappe-ui-0rNYcqgR.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/lms/frontend/assets/frappe-ui-DzKBfka9.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/lms/frontend/assets/index-DOZMTxMe.css">
|
||||
|
||||
Reference in New Issue
Block a user