editor-js / editor-js/embed

conflict tag <%= remote_id %> with ruby on rails while using in erb.html file

Open
#116 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
159
Forks
105
PR merge metrics
No merged PRs in 30d

Description

The issue arises from the conflict between the ERB tags <%= remote_id %> and Ruby on Rails syntax. The tag <%= remote_id %> is interpreted as a Ruby variable or method within the ERB context, causing the error "undefined local variable or method 'remote_id'.
How can i solve this

youtubereels: {
regex: /https?:\/\/www\.youtube\.com\/shorts\/([^\/\?\&]*)/,
embedUrl: 'https://www.youtube.com/embed/<%= remote_id %>',
html: "",
height: 338,
width: 600,
id: (groups) => {
const extractedId = groups[0];
const llk = groups.join('/embed/')
console.log('YouTube Reels Video ID:', groups);
return llk;
},
},

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.