#409October 12, 2017by nhinq3 answers
Im using type: 'remote', but it can't loaded to canvas
mekamleshk
@nhinq you can refer to my code Here I was able to upload and retrieve files.
artf
follow the issue posted by Kamlesh
nhinq
Ok Thank you - will try it
#408October 12, 2017by dong-dev2 answers
Hi Artf, i was added new command to editable component, update style work well but i don't know how to update this toolbar after component updated (update align icon for example), do you have any suggetion? defaultCommands['testCommand'] = { run(ed) { var sel = ed.getSelected(); var styles = sel.get('style'); var tbs...
artf
You can set a listener on component update Be aware that with var styles = sel.get('style') you get the style of the component and not what is selected in Style Manager (if the component has classes, the css rule will be selected)
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.
#407October 11, 2017by ateshuseyin3 answers
Hi @artf, I want to define a new markup language like mjml to make design more easy and readable. I started with <error>tag as a POC. Write code below; model: import Component from 'grapesjs/src/domcomponents/model/Component'; const ComponentError = Component.extend({ defaults: { type: 'error', tagName: 'error', ...Co...
gasserol
Did you see that there is a preset from the author of this project for mjml, maybe this helps you? https://github.com/artf/grapesjs-mjml
ateshuseyin
Thanks @gasserol. I saw but I could not find the problem.
ateshuseyin
Now works on drop :) But still cannot parse from element.
#405October 11, 2017by NicholasGati3 answers
Ciao, spero che stai bene e grazie per GrapesJS! I am trying to create a way for users to create multiple choice questions. The first block below is the section that has a form with an unordered list inside of it. The unordered-list inside of the form should be able to accept a list item, which is another block in its...
artf
Hi @NicholasGati I think it might be an issue with data-gjs-stylable="false" can you try to remove it from <ul> and <li> and check if it works
NicholasGati
Hey @artf, thanks for replying. I removed data-gjs-stylable="false" and it still does not work. I get the same error: 'Target collection not found, Target is not droppable...'.
artf
Are you able to reproduce it by using something like jsfiddle/codesandbox?
#404October 11, 2017by thecodefish3 answers
You can see this in action on the demo (http://grapesjs.com/demo.html). Select one of the nav items ('Web' for example) - note that it has an existing class of menu-item. If you now change some of the properties, such as text alignment, it applies those changes to the menu-item class, which affects the other instances...
thecodefish
I was thinking that the behaviour could be something like this: Default (current setup):If element has no classes, create unique class based on cid and apply stylesIf element has classes, apply styles to the union of those classes (or what...
artf
Hi @thecodefish what do you think about this approach? https://codepen.io/artf/pen/jaaKvq You will see there how to make selectors private (not stylable by the user) and the usage of the new avoidInlineStyle option which allows you to styl...
artf
I'd say you have 2 options:Just deselect the class, in this case, the style manager scope will change to the component and not the ruleAdd a new class to the component, instead of .menu-item rule you will get .menu-item.your-new-class
#403October 10, 2017by danfitz363 answers
the demo shows a newsletter, but I don't think the css gets inlined, which is really needed for better email support. https://github.com/Automattic/juice
danfitz36
oh that's great, thanks. i didn't get that far in the demo i guess.
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.
#402October 10, 2017by danfitz362 answers
are there specific features needed, some amount of testing required? what specifically needs to happen and how can we help to make it happen?
artf
Good question. Didn't think too much about it, probably I'd say a more stable API, make the core dry as possible (less opinionated stuff) and probably have to complete some feature from the current Roadmap.
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.
#401October 10, 2017by gasserol3 answers
Hi, while uploading an image through asset manager, I get the following error: Assetmanager configuration at editor init looks like Folder exists and is writable. Can you please help? Many thanks for this excellent software beside this issue :-)
artf
The upload endpoint should return a JSON, your seems to return an HTML
gasserol
OK, many thanks, don't know how to solve this.. I'm using a normal apache server on localhost for tests and believe that this endpoint does not answer at all. I will try to implement your solution to the yii2 framework, there I can handle...
mekamleshk
@gasserol you can refer to my code Here I was able to upload and retrieve files.
#400October 10, 2017by sanjeevSavitr3 answers
Hi, I want to hide a particular element when ever we click a toolbar button commands: { defaults: [{ id: 'submenuitem', run: function(editor, senderBtn){ // I want to hide "photostack-1" element ???? ???? ???? }, }], } var domc = editor.DomComponents; domc.addType('bannergalleryportion', { model: defaultModel.extend({...
artf
You can access the element from the model
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.
#399October 10, 2017by bungambohlah3 answers
Hello again @artf , i confuse about push toolbar in the element with specific class (ex: modal-trigger) the element code is : and in the /src/dom_components/model/Component.js as you can see, the element to push toolbar just in tag element, and can i push toolbar to all element inside ? Thank you and sorry for my bad...
artf
I'd say the correct way to do so is to extend initToolbar() of the Component model and put there you logic
bungambohlah
I'd say the correct way to do so is to extend of the Component model Of course, i make my custom toolbar in method and please @artf can you explain about the logic to push the toolbar in the child object? i confuse about the backbone struc...
bungambohlah
Sorry i have fixed this with my logic, thank you @artf :+1: