Hi! I'm trying to change the value of the classes with very little succes. Here is my custom trait's onValueChange function: Which results in an HTML output of: Obviously, this isn't legal HTML. It also produces weird results when adding or removing a class in the Classes input. What is the correct way to go about thi...
FrikkieSnyman
@artf Is this even possible?
FrikkieSnyman
So I got this figured out, in a quite hacky way, but it works! Just create a custom trait, and use the following for the onValueChange()
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.
is there any example for adding video component the same way as adding images which have uploading dialog ?? any code would be appreciated! <div controls="" src="http://127.0.0.1:8000/media/PyQt4PythonGUI6FileBrowseButtonH9wtiVE.mp4" onmousedown="return false" class="gjs-comp-selected" style="height:607px;"> <video cl...
artf
No, but you can create a new Component by following this https://github.com/artf/grapesjs/wiki/Components and #286
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.
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.
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.
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?
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
artf
Actually it does
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.
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.