#725January 7, 2018by hesa20202 answers
Hello, I would like to know what would be the best route to take to extend the Editor. There is a few features i would like to add for my project:Split view ( Edit / Preview )CSS Editor ( Create classes, animations, etc.. and then i can set my element to use that class )Html editor ( Im sure it could be done easily us...
artf
Hi @hesa2020 you should definitely create plugins to customize the editor and you can start from reading here. Another important resource for customization is API Reference, if you have problems try to check first in repo's issues. For the...
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.
#724January 5, 2018by kickbk3 answers
Getting this.get(...).each is not a function with the latest 0.12.58 version (cdn min.js). The line that triggers it is return this.get("classes").each(function(e){return t.push(e.get("name"))})
NicholasGati
Just wondering, does this.get(...) return an array? If not, maybe you can try this: Not sure if that's what the issue is but I figured I'd chime in and try to help :)
ryandeba
Hi @kickbk, It is unclear what this is bound to in your code...is that a reference to a component? If you could create a jsfiddle to demonstrate the error, that would be very helpful. I've not been able to recreate the error so far. I ran...
kickbk
Thanks for replying guys. I traced the issue to my custom components' Traits. What's triggering it is that I load default values for traits: As you can see my plugin extends on grapesjs-mjml. Changing default to value gives the same error....
#723January 5, 2018by NicholasGati2 answers
Hey Artur! I am not sure if "Issues" is the right page to write this because it is more of a suggestion. A Change Log is needed between GrapesJS versions. We are using GrapesJS in a project and are currently switching from an old version to the most up-to-date version. While we have customized the library for our own...
artf
Hi @NicholasGati, you can find the changelog inside github releases https://github.com/artf/grapesjs/releases
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.
#722January 5, 2018by wvaymen3 answers
i would know if there is a method to add blocks into a sub categorie in the panel of blocks?
artf
no @wvaymen you can only put blocks inside categories
wvaymen
please can you give me an example thanks for your help
#721January 5, 2018by wvaymen2 answers
I have question about injecting script js into GrapesJs. Can I adding <script> into grapesJS using function editor.getComponents().add() and not injecting using javascript. document.createElement('script')
artf
@wvaymen sure, but you have to enable script importing before
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.
#720January 5, 2018by krunal0393 answers
I want to display document dirty indicator unless document is saved to database. I have custom button on editor to save html to db I tried below #551 but it only fires while loading html from db to canvas and it does not fire for any changes afterward. editor.on('change:changesCount', () => { const editorModel = edito...
artf
Tried this in the demo and works as expected
austinbiggs
@artf - I tried this in my code an nothing happens. This works for you? I'm running v. 12.58 😄
artf
This works for you? Yeah, it works with the demo (which uses the latest version)I tried this in my code an nothing happens Have you tried to change the structure of the template?
#719January 5, 2018by richieteh943 answers
I know is an old problem but I have an issue for the respond where I tried to return a response by using asp.net to return a response below is my code(services code to save into directory and return a response): (code in ashx asp.net) context.Response.ContentType = "text/plain"; context.Response.Expires = -1; try { Ht...
artf
there is an error when parsing the response at grapesjs Which error??? Probably just try to change context.Response.ContentType = "text/plain"; with context.Response.ContentType = "application/json";
richieteh94
hi @artf the error is I tried changed the context.Response.ContentType = "application/json"; but still get the above error and my response from service is as below the response get by using Fiddler 4. and I would like to check whether the...
artf
Unexpected token E in JSON at position 0 means your response it's not a valid JSON string (which should start, for instance, with { or [ not E, probably there is an Error...). Check the response in your dev tools and you will see it
#718January 5, 2018by krunal0392 answers
Is there way to add description to trait? we have below trait and want to add description so user understand what is purpose of it. traits: [{ type: 'checkbox', label: 'Active', name: 'isActive', changeProp: 1, description: 'will make slider available on page' }]
artf
Nope, but you can define custom Traits and customize renderField method
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.
#717January 5, 2018by endersaka3 answers
Hi. I think that this project is amazing. I especially interested in what is written in the "README.md" page, where you present an image depicting the process of connecting Grapesjs to a CMS, and I also read the issue #41 . Despite all these informations I have a really poor knowledge of Grapesjs at this time. Though...
artf
Hi @endersaka, thanks for your appreciations and suggestions. WordPress plugin for GrapesJS is definitely a good showcase of an integration with CMS but working on the project just in spare time and lack of deep knowledge of WP codebase wa...
endersaka
@artf thank you for your answer. I have the same problem with spare time; though I will most probably give it a try. This morning I read the Components documentations more carefully and I see some opportunities. Since Components are actual...
artf
Great 👍 Since Components are actually stored in to the JavaScript data model of Grapesjs, I am not sure, but I see an oportunity to output something that affects Componets model instead of their in editor HTML representation. Exactly, usu...
#716January 5, 2018by krunal0393 answers
I do not want user to resize image on specific area of template, but want to allow anywhere on canvas. I want user to just choose image and does not allow to resize for specific class/element.
artf
You probably need to do something like this on render
faruk247
each((el, i, $els), it create error. Just replace by each( function(el, i, $els) complete code: var wrappers = editor.DomComponents.getWrapper(); wrappers.view.$el.find('.rm-editable img').each( function(el, i, $els) { var $el = $els.eq(i)...
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.