Link element not append in head element in ediot.canvas #firefox #grapesjs
Question
am trying to add google fonts in web-builder to change the font style for that to import am adding cdn in editor the code works in chrome and safari but firefox not working
createLinkElement(fontFamily) {
let link = document.createElement("LINK");
link.setAttribute("rel", "stylesheet");
link.setAttribute("href", `https://fonts.googleapis.com/css?family=${fontFamily}`);
return link;
}
editor.Canvas.getDocument().head.append(this.createLinkElement(fontFamily));
element also not appendingAnswers (3)
I've made the issue template for a reason
I've made the issue template for a reason
i want to add custom fonts in web builder could you please help me out
Hi! might be very late to comment but have you tried this? -
const link1 = document.createElement('link');
link1.rel = 'stylesheet';
link1.href = '/page-builder-assets/css/style.css';
canvas.getDocument().head.appendChild(link1);
it worked for meRelated Questions and Answers
Continue research with similar issue discussions.
Issue #950
Editor.setdevice() not working properly on some browsers.
I am changing the device by using editor.setdevice function by calling it in document.ready function. On most devices it is working fine bu...
Issue #2715
I have added the custom font using the method below but that font is only working in few cases
There is one font issue when i click on any element it not show the current font of the element, i added custom code for add my custom font...
Issue #1497
Inner element content change with pop-up
Hello @artf I've make pop-up for select custom link data with image. Now all the data reflected properly but when I try to change src than...
Issue #1094
add custom style for map element in mobile view
can you please let me know how can change default width from auto to 50% in mobile view for map element.
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins βPremium plugins ship with support, regular updates, and production-ready features β save days of integration work.
Browse premium plugins βBrowse Plugin Categories
Jump directly to plugin category pages on the marketplace.