@artf can you please give one complete example of a chart using chart.js with traits for changing the colour, values & Data Points.? It would be great if i can get a help.
Geczy
You can use the sandbox demo here https://github.com/artf/grapesjs/issues/559 It lets you modify traits and updates the dom. Should get you started
suchithmahadi
@artf Please help me out.
artf
@suchithmahadi for this kind of question I'd recommend asking on https://stackoverflow.com
I can see classes are added on canvas but when I get html via editor.gethtml(), i so some of classes are not included and it is just divs without any classes. attached screenshot with html on canvas and html via editor.gethtml()
Geczy
Don't think gjs- prefixed classes will return
arthuralmeidap
When you use the editor.getHtml it returns just the html . If you need the css too, you can use the editor.getCss().
Geczy
I use newsletter-plugin and const html = window.grapesjs.editors[0].runCommand('gjs-get-inlined-html')
Hello, is there way to move text inside element? something like absolute drag and drop
Geczy
No, it's on the roadmap though https://github.com/artf/grapesjs/issues/74Absolute/Designer mode With this mode enabled the user should be able to move components "freely" inside the canvas (relying on absolute positioning)
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hello @artf How can I pass external script link while creating a component? like this way, bm.add('test-block2', { label: 'Test block2', attributes: {class: 'fa fa-text'}, content: { script: '<script src="https://cdn.ckeditor.com/4.6.2/full/ckeditor.js"></script>CKEDITOR.replace( \'editor1\' )', content: '<textarea na...
Move the script tag to import CKEditor on the html page and just call the script inside the block.
rohanreddyg
javascript somehow not allowing script end tag ("</script>") with in string. So just change the code to be like: script: '<script>alert("Hi");<' + '/script>'
Hi @artf, I would like to get your thoughts on the following 2 items before submitting a pull request. These are to satisfy requirements for a project that I'm currently working on, but I'm hoping that they could have a place in grapesjs core.Prevent the hover highlight effect on certain components. Components already...
artf
Prevent the hover highlight effect on certain components. Components already have a "highlightable" property that is being used for the dotted outline style. I was thinking about using that same property to prevent the hover highlight effe...
ryandeba
Thanks for the feedback! I've created a couple of pull requests for these items, let me know if you want to discuss further.
Hello, I would like to ask if there's any existing support or API for adding new components to an existing component list (e. g. after fetching or generating them dynamically). I'm talking about something like this: I've studied the documentation and the closest I got is the function. Unfortunately, this function spec...
ryandeba
Unfortunately I am not aware of a simple way to get a specific component object without recursively iterating through them to find the one you want, but that sounds like a great idea! You might be able to do something like this to get all...
baxxos
Thanks for your replies, I think my question has been answered and there's not much else to add. I'm closing this now, however the find() method would be a welcome addition to this awesome framework.
ryandeba
Hi @baxxos, Are you trying to do something like this: https://jsfiddle.net/ztqsugaw/3/?
I've found this here #351 but seems not to reset the body background... Any other way to do this?
artf
@duskhacker I'd say it's somehow related but not the same issue. CSS you're mentioning it's generated from two different places and it's some kind of a basic CSS reset *{box-sizing: border-box;} comes from https://github.com/artf/grapesjs/...
ryandeba
Hi @g41n, Can you provide a jsfiddle (or equivalent) showing the issue? I just put this together which first sets the body background color to blue, and then clears that style 2 seconds later: https://jsfiddle.net/gn3jtahv/. That seems to...
g41n
Hi @ryandeba, thanks for the reply. After some digging here there is a fiddle https://jsfiddle.net/x118ks1v/ and steps to reproduce:click on the reset button, reset is successfullclick on body and change background from the panel on the ri...
I'd like to indicate that the document is not saved. What would be the best way to know if the document data has changed from the last load/save? Thanks!
duskhacker
Perfect! Thank you so much for the quick reply ... and also this project. Very nice!
artf
There is an internal counter which you can use like this
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
In the Asset Manager, when the x to remove an asset is clicked, it appears to fire both the onDelete event AND the onClick event. This puts the asset you just deleted into the target. Furthermore, one cannot click another asset to replace it in the target until you close the asset manager window and re-open it. If the...
ryandeba
Hi @duskhacker, I was able to recreate the issue of the onClick event firing when clicking on the X (jsfiddle in case anyone else cares to see it: https://jsfiddle.net/8v946q4b/3/). Sorry I don't have a lot of time to debug this myself at...
duskhacker
I may have time to research this tomorrow if you're still having trouble @ryandeba Thanks for the followup! This is one of my outstanding problems with GrapesJS. I know I'm not going to be able to fix it in a reasonable time-frame, I'm not...
ryandeba
@duskhacker - I've submitted a pull request that should fix this bug https://github.com/artf/grapesjs/pull/560
Just a thought, but you may want to consider loading fontawesome agnostically in your CDN files. Currently getting "Access to Font at 'https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.12.37/fonts/fontawesome-webfont.woff2?v=4.7.0' from origin 'http://localhost:3000' has been blocked by CORS policy..." on dev environm...
artf
Thanks @kickbk :) Anyway, I don't get exactly which is your solution
kickbk
@artf you're referencing FA in https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.12.37/css/grapes.min.css with ...'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0") so cloudflare is trying to load the fonts from https://cdnj...
artf
@kickbk well actually I plan to remove FA (#74) from core's dependencies and replace the used icons with SVGs