GrapesJS Issues

Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.

3464 issues found

#556November 22, 2017by crestinfo2 answers
1 reactions

Drag and Drop text inside element

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.

#555November 22, 2017by HarshOB3 answers
2 reactions

Add external script in script while creating new component

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...

artf

@HarshOB https://github.com/artf/grapesjs/wiki/Components-&-JS#template-related

arthuralmeidap

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>'

#554November 22, 2017by ryandeba3 answers
0 reactions

Prevent hover highlighter and prevent selecting certain components

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.

artf

Merged, Thanks Ryan 👍

#553November 21, 2017by baxxos3 answers
2 reactions

Adding new components to existing ones

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/?

#552November 21, 2017by g41n3 answers
1 reactions

Can't reset body background

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...

#551November 21, 2017by duskhacker3 answers
1 reactions

Document dirty indicator

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.

#549November 20, 2017by duskhacker3 answers
0 reactions

Asset manager delete problems

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

#548November 20, 2017by kickbk3 answers
0 reactions

Agnostic protocol on CDN

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

#546November 20, 2017by krunal0393 answers
1 reactions

Inline css to class

@artf thanks for amazing project, it mad site editing much easier. by default editor convert inline css to class but is there setting not to convert inline css to class as we do not want to convert it to class?

artf

If you grep forceClass you will see that it does just one thing https://github.com/artf/grapesjs/blob/dev/src/dom_components/model/Components.js#L77 so when you add a new component and there is a not empty style attribute, all its properti...

artf

Have you tried with forceClass?

francesca-cicileo

I am also looking to do the same thing, but setting forceClass to false does not seem to work. I made a minimal JSFiddle here that tries to use inline css instead of classes, but the editor always moves the styling into classes, even with...

#545November 20, 2017by NorthstarTech3 answers
0 reactions

Buttons in sector

How to add the custom button while adding a new sector in grapesJS? Is there any property? How should I create a button while making new sector. Thanks

artf

@NorthstarTech what is your use case with a button?

NorthstarTech

It doesn't need to be a button specifically. We want to add the merge tags/placeholders. Since we offer a large library of them, it would be user-friendly to have inside a sector. Essentially, we would like the placeholders to divided into...

NorthstarTech

#287 is similar but we are unsure where they are adding the merge tags within the editor.