#793January 24, 2018by chiqui3d2 answers
Hello, I would like to know if I can only edit the icon and title of the code command. Also another doubt, is that I'm starting and I'm making a mess when it comes to searching the documentation, by chance you don't have an image of the publisher that says it's everything to identify it, faster and know how to edit so...
chiqui3d
Solved with removeButton
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.
#792January 24, 2018by alvim3 answers
In Components & JS docs there's this example: This works perfectly. But I couldn't use a function instead of a string in script, as is said it's supported like this example: It won't happen anything. The documentation isn't very clear about using scripts in blocks or components.
artf
Find where is the issue, it will be fixed in the next release
chiqui3d
@artf These changes when they will be published?
artf
@chiqui3d should be fixed
#791January 24, 2018by lauragadea3 answers
Hello, I am trying to add a new button to the toolbar of all the components. I been able to add for each component separatly, but not for all of them at once. To note that I want to avoide modifying the file ‘src/grapesjs/dom_components/model/Component.js’ Is there a way to do that? Thank you in advance for yur help!
artf
@lauragadea probably you should try to extend default component types (eg. default, image, text, etc.)
JulyanoF
@lauragadea , please check #266
lauragadea
Yes @JulyanoF , I already have. And it suggests modifying the files ‘src/grapesjs/dom_components/model/Component.js’. That is exactly what I am trying to avoid.
#790January 24, 2018by JulyanoF2 answers
I'm trying to separete a text editor from block, something like it: Is it possible?
artf
@JulyanoF sure, you can create a custom Trait (eg. textarea which, on render, initializes with some custom RTE) and on update change the component's content ps: please, next time, follow the issue template
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.
#789January 23, 2018by Geczy3 answers
It's as if it's not parsing down the DOM Reproduce. View console log https://codesandbox.io/s/lxl7x2mnq You can see there are way more than 5 components / models in this sandbox. But console log only shows 5 If I add one to the root of the dom tree, it will show 6. But if I add one to a child component, it will not se...
artf
@Geczy probably I've to update the description, but getComponents just returns wrapper's components (with its children), if you want to return an array of all components you can do 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.
#788January 22, 2018by JulyanoF1 answer
I already tried different ways to do it, but it's still not working... First: editor.addComponents('<style>img{width:100%}.botao-roxo{background-color:#8D7EA2;border-color:#8D7EA2;color:#FFF}.botao-roxo:active,.botao-roxo:focus,.botao-roxo:hover{background-color:#FFF;border-color:#8D7EA2;color:#8D7EA2}.botao-grande{wi...
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.
#787January 22, 2018by ghena2 answers
Hi Guys, I dont understand how save ad load conditionl html comment for e.g: <!--[if (mso)|(IE)]> <table align="center" border="0" cellpadding="0" cellspacing="0" width="650"> <tr> <td> <![endif]--> <table align="center" border="0" cellpadding="0" cellspacing="0" class="full-width" style="max-width: 650px;" width="100...
artf
You have to create the comment component #208
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.
#786January 22, 2018by perfect-coders3 answers
I am cloning an element. I want to get the next element or previous element. By this I mean to say that How can I get the model or How should I give some custom attribute to the cloned element. Thanks in Advance.
JulyanoF
When you say "element", you are talking about blocks? Like button, text, section...?
JulyanoF
You can get all blocks like this: var blocks = editor.BlockManager.getAll().models;
#785January 22, 2018by lypliuyinping3 answers
Hello, I want to do a button component, click on the button, it will pop up a dialog box that contains some text boxes and OK and Cancel button, click OK and Cancel button will perform different functions, may I ask how to achieve this? Thank you for your answer
JulyanoF
Hello @lypliuyinping You can create custom blocks like this:
lypliuyinping
@JulyanoF Firstly, thank you very much for your reply! Then, I would like to ask, how to achieve the button click event? For example: Click the button to bring up the text box.
JulyanoF
Are you using bootstrap? Or another js lib to create a dialog box?
#784January 22, 2018by lypliuyinping3 answers
Hello, I am a graduate student, I would like to study in detail Grapesjs, if convenient, can I share Grapesjs uncompressed source? I will be very grateful to you!
lypliuyinping
Will you send it to my mailbox? Or share as a link?
artf
@lypliuyinping everything you need is inside src folder