[Question] issue with css and icons
Question
hey @artf i installed grapes js through npm [ "grapesjs": "^0.15.9"] and i'm using vue with grapes js , here is my code
------------------------------------------------------------------------------------------------------------
import grapesjs from 'grapesjs';
import 'grapesjs/dist/css/grapes.min.css';
export default {
data() {
return {
editor: null
}
},
methods: {
change() {
this.$emit('change', this.editor.getHtml());
},
},
mounted() {
this.editor = grapesjs.init({
container : '#gjs'
})
this.editor.on('change', this.change);
}
}
i'm having issues with css as few icons are missing and remaining icons are not responding to any action. and there are no errors when i run npm and no errors in the browser console too.
os-windows10 , node-13.0.1,npm:6.13.0
**This how my ui looks like**
Answers (1)
@raghuv9 creating a custom vue component for grapesjs:
import grapesjs from 'grapesjs'
const VueGrapesjs = {
install (Vue, options = {}) {
const config = {
presets: []
}
const { presets } = Object.assign(config, options)
if (presets.length) {
presets.forEach((data) => {
const {
name,
options = {},
loader
} = data
grapesjs.plugins.add(name, (editor) => {
loader(editor, options)
})
})
}
Vue.prototype.$grapesjs = grapesjs
}
}
export default VueGrapesjs
and to actually use it:
<template>
<div id="app">
<grapesjs
:options="gjsConfigs"
/>
</div>
</template>
<script>
export default {
name: 'app',
data () {
return {
gjsConfigs: {
plugins: ['charts']
}
}
}
}
</script>
check this repo for more info. cheers!
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2262
blocked by cors policy No 'Access-Control-Allow-Origin' header is present on the requested resource
hello i'm using grapesjs with vue wrapper i'm unable to load a webpage using urlLoad: of grapesjs im facing cors issue,i'm pretty new to gr...
Issue #1686
CMS: Grapesjs is not defined
I am trying to use basic Grapesjs editor to CMS. Here's my code: I have installed the grapesjs using NPM. Later I tried running this html f...
Issue #3534
BUG: npm run build error
npm run build gives error @version 0.17.3../../lib/codemirror in ./src/editor/dist/grapes.min.js../css/css in ./src/editor/dist/grapes.min....
Issue #1842
Showing two times some properties and not showing some options too.
Hello, @artf @NicoEngler, I have one strange issues. I am using grapes.js and grapes.min.css with version of 0.14.50. While i am selecting...
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.