#481November 3, 2017by mathieuk3 answers
This is not a bug but an implementation question. If this is not the right place to ask these questions, please let me know. We're working on an implementation where we want to use GrapesJS to allow users to create an e-mail template. As part of this implementation we are working to create mail-merge functionality: we...
artf
Have you checked API-Rich-Text-Editor? You can add a custom action like this
artf
Probably in the next release, this feature will be available. So textable will be just another property, this will allow any component to be dropped inside Text components. Here is the code of the component from the example above:
mathieuk
Yes, I've used that and I've pretty much got that working. The difference is that I am not using a text placeholder like you are. I'm actually inserting a block (with a corresponding 'type') so that I can further configure these placeholde...
#478November 2, 2017by HarshOB3 answers
Hello, Is it possible to make two TextBoxes under the same label? If it is possible then how can I create that?\ Thank You.
artf
@HarshOB I don't understand where is the issue. Have you tried just to drag another input?
HarshOB
Yes, I have tried but it won't work. Like I want two text boxes in front of one label like if as shown in below image I want to make two text boxes under the same label "TOKEN"
#477November 2, 2017by HarshOB3 answers
Hello, So, I want to define Two traits in the component settings. First one is CheckBox and another one is TextBox(There can be multiple). I will define First CheckBox the multiple Input fields. When a CheckBox is clicked/checked on the base Next TextBoxes/input fields (That will be disabled by default) will be Enable...
artf
@HarshOB Did you check already the wiki about Traits? I explain there how to add checkbox inputs and how to react to their changes. If it's not clear can you point me out what should I add?
HarshOB
Here I explain again with a screenshot. You can see that there are two text fields under one checkbox. So, when I clicked on checkbox/ check that checkbox then that two input fields will be enabled(I want it to disable when it loads for th...
artf
No, it's not something you can do with a built-in trait, but you can define your own type (which can even include all your inputs) by extending the default one
#476November 1, 2017by Geczy3 answers
For example if I import <p><span style="font-size:50px;">hi</span></p> via grapesjs import command, the following is set as the component: <p data-highlightable="1">hi</p>. Losing my styles
Geczy
You can reproduce on http://grapesjs.com/demo-newsletter-editor.html My issue is described here https://github.com/artf/grapesjs/issues/341 https://github.com/artf/grapesjs/blob/dev/src/parser/model/ParserHtml.js#L145
Geczy
In my case it is preferable to not strip the <span> and leave it in the HTML. Why was it removed? Be careful of things like: What should the expected output be after the parser? Hi should be 50px, hey should be 12px. This is why the html p...
artf
I agree with you Matt, indeed, as already mentioned, I'd like to remove it but need to find time to test it, to be sure it's not breaking other stuff. I close this in favor of #341
#475November 1, 2017by ateshuseyin3 answers
I want to open a confirm dialog before removing image from assets manager. There is not any feature at the same time there is no appropriate api for it.
artf
You can use this code from Assets documentation Put it inside a plugin otherwise it won't take effect on already defined images
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.
#473November 1, 2017by arunBenchamin2 answers
Nice work .Got a little problem if the styles for the web page is moved to a stylesheet then most of the css properties in decorations sections not loading from stylesheet. (eg: background-image property for header)
artf
This is a correct behavior if you're loading CSS as a remote resource. One workaround, for your case, would be to load CSS via ajax and add the result with editor.addComponents('<style>${cssText}</style>')
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.
#472November 1, 2017by mekamleshk2 answers
Hi @artf I am trying to save my template in database on click of save I wanted to show a success message in toast. Can you please help me with some example code.
artf
Use storage events (you can find the complete list of events here: API Editor)
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.
#471November 1, 2017by tomichal3 answers
Hi, I would like to include a third-party styles and javascript in the editor. They are being added like this: The issue I'm experiencing with the third-party CSS is that some of its style rules are colliding with the style rules of the editor, e.g. the third-party library uses a class "row". Is there any recommended...
tomichal
I looked inside the https://github.com/artf/grapesjs-blocks-basic plugin and it looks like the problem I'm experiencing is coming from there, namely the plugin does not use the grapesjs editor's config setting, despite initially fetching i...
artf
Hi @tomichal seems like you get exactly where is the issue. I close this in favor of https://github.com/artf/grapesjs-blocks-basic/issues/2
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.
#470October 31, 2017by mekamleshk3 answers
Hi @artf When I try to click on the sent-test button it gives me this error, I tried with the updated version of grapesjs-preset-newsletter
artf
@mekamleshk that button was removed, you can check it also here http://grapesjs.com/demo-newsletter-editor.html
mekamleshk
@artf I know you removed it earlier, but I was using it as pop up box to save my template into database. Is it that it is completed removed from the framework ?
artf
It never was part of the framework, it's just a custom panel I used in https://github.com/artf/grapesjs/blob/gh-pages/demo-newsletter-editor.html
#467October 31, 2017by perfect-coders3 answers
I am opening a pop up on click o some element, but the focus is still on the element on which I click. I want to focus the pop up element. Is there any way in grapesjs ?
artf
Which popup are you talking about? The built-in modal?
perfect-coders
I have make one custom pop up in grapejs and opening on element click. So I want when user click on the element , a pop up will open and the pop will be selected by default. Now what happens, I am opening a pop up element on click of link...
artf
well, if it's your custom popup I think it's up to you managing the focus