mm or cm Units are converted to px
Question
I realized that mm or cm units are converted to px. How can i solve this problem?
Thank you

Answers (3)
Did you add mm, cm etc, as units to the style manager inputs, these are not built in
As stated above it's what the browser engine does, usually this is the fix, but I've never used it with units that aren't built in:
window.editor = grapesjs.init({
// ...
styleManager: {
// ...
avoidComputed: ['width', 'height', 'padding', 'margin'],
// ...
}
// ...
});
I think that's just what the browser engine does in general. I'm no expert, but I think that output is just the final info interpreted by the engine.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2493
Invalid array length when dragging component onto canvas
Not sure why, But all of a sudden, when I start dragging components onto a canvas, I get this: This seems to happen when I edit a template,...
Issue #2972
FEAT: Disable scripts on canvas
Hello, first of all thanks for a great tool. On my project i hit the problem where I need to disable scripts inside the editor. I found 2 s...
Issue #1791
Name of the destination
@artf, Is there any way to show the name of the destination element ?
Issue #3350
Uncaught TypeError: can't access property "el", n is undefined
Hello, I'm using grapesjs 0.16.44 and only in firefox I'm faceing this issue. Using grapesjs block basic preset. Anyone can help me? Thank...
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.