Vendor prefix getting removed when getting css from getCss()
Question
I am using the version: 0.14.57 with React 16.8.6.
When I use the function editor.getCss() it returns me the css but without the vendor prefix. For example, I add the following css .product-card { -webkit-transition: all 0.2s ease; transition: all 0.2s ease; } it returns me .product-card{ transition-duration:0.2s; transition-timing-function:ease; transition-delay:0s; transition-property:all; }. How can I avoid this behaviour and get what I am saving (with the prefix)? I checked this in the demo, it works fine there but with my local I am having an issue. Unfortunately I can't publish it else where and don't have it live atm. It's just this one, getCss() function that's causing the issue. Following is my initialization:
let editor = GrapesJs.init({
container: "#gjs",
fromElement: true,
plugins: [
'gjs-blocks-basic',
tUIImageEditor,
GrapeJSFormPlugin,
editor => FontAwesomePlugin(editor, {}),
editor => SocialMediaPlugin(editor, {}),
editor => VideoPlugin(editor, {})
],
canvas: {
styles: [
"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css",
"https://fonts.googleapis.com/css?family=" + fontFamilies,
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css"
],
scripts: [
"https://code.jquery.com/jquery-3.3.1.slim.min.js",
"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js",
"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js",
'https://use.fontawesome.com/145d2bb38b.js'
]
}
});
I'm applying the styles with editor.setStyles(css). It sets fine but when I retrieve it, it removes the prefix. Any help would be appreciated.
Answers (2)
Worked like a charm @artf ! Thank you so much!
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3832
BUG: The css classes are removed and the autogenerated ids for each html tags gets changed ( Example : ivj5m-2) after each reload
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link Not there De...
Issue #1836
How to add !important in all the generated apis
Hello @artf, While i am going to edit some html from editor with the help of css then i need to add !important into all the css which is ch...
Issue #1525
How to get data from forms in grapesjs
Hello All, I am using Forms block in grapejs and using grapesjs with angular 6. but i am not getting that how can i get data from forms whi...
Issue #1211
Adding a working Import Panel Button without the presets
I want to add the Import button at the panel for importing templates, but I don't want to use the presets. I have already added the followi...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.