Amazing library, thank you!! I have two questions I'm hoping you can help with.How can I move the command panel from the top to the left as is shown here: https://github.com/artf/grapesjs/wikiI was having trouble getting the block icons to show, I saw individual letters instead. I was able to fix it by copying the mai...
artf
Hi @hillelcoren How can I move the command panel from the top to the left as is shown here Panels are all arranged freely by CSS so you can move them as you wantI was having trouble getting the block icons to show, I saw individual letters...
hillelcoren
Thanks for your help!
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.
I wish to remove/hide the below mentioned "view" from the Panel. Is it possible via API or I need to externally hide using css ? editor.Panels.getPanel("views").attributes.buttons.models[2].attributes.visible = false;
ryandeba
@anand-gopinath - this code works for me in a plugin: editor.Panels.removeButton("views", "open-layers"); It doesn't seem to work for me after the editor has fully loaded...I suspect that it needs to get removed before the view is rendered...
ryandeba
@anand-gopinath In case it's helpful, here's some code that I'm using to reorder those buttons (this also probably needs to run in a plugin):
artf
Thanks Ryan, I'll add a new listener, in the next release, which should fix the issue
When I use editor.getSelected().set('content', 'somethig'), theoretically it changes value correctly as I see in editor, but when I call editor.getHtml() or I enable autosave (that probably call getHtml()), it is showing "<div class="c891">somethingInsert your text here</div>". It is always incrementing the text. Edit...
or how to get all the html code and css so that I could save it in my database. Or there is already a functionality in the documentation? your help will be much appreciated :)
josefph
Sorry for this post. I was only able to look at the Open Issues not knowing that there are closed issues. I was able to know that I could use editor.getHtml() and editor.getCss() which I could just save right away in my database to save my...
artf
@pranzikkin you can set up a remote storage #778 which will store your data automatically
Hi @artf, Please let us know how we can set the href attribute of anchor inside div when element is dragged i.e <div class="social_icons rrssb-buttons c3250"> <a href="https://www.facebook.com/sharer/sharer.php?u=http://starteo.softobiz.com" class="popup rrssb-facebook" id="ibvm"><i aria-hidden="true" class="facebookS...
JulyanoF
@Deepak813 I guess that it isn't in model, it should be something like: editor.getSelected().set('href', 'https://www.facebook.com/sharer/sharer.php?u=') You don't need to access model
Deepak813
Hi @JulyanoF, Thanks for the message, I have used this code when element is dragged but display following error: Uncaught TypeError: Cannot read property 'set' of null. As i want to update the href of anchor tag inside the div when element...
JulyanoF
@Deepak813 Oh, you want to change anchor when is draggin/dropping?
How can I change and get the content of current selected block?
JulyanoF
To get content: editor.getSelected().get('content') To set content: editor.getSelected().set('content', 'myhtml')
artf
@JulyanoF be aware that content is for static strings (used mainly for custom RTEs) therefore by doing this editor.getSelected().set('content', '<div>TEXT1</div>...') you wouldn't be able to edit inner elements.
JulyanoF
selected.components() @artf I don't want to create a new component into the selected block,. I need only edit the content. When I use this method, it is creating a new div into the previous block. How can I avoid it?
How can I make "click" event on texts open different panel's view than StyleManager? I'm trying this:
artf
different panel's view than StyleManager Probably you're talking about the behavior in the demo, implemented by the webpage preset here https://github.com/artf/grapesjs-preset-webpage/blob/master/src/panels/index.js#L106 So in your case, i...
JulyanoF
@artf so, I tried it and didn't work, it isn't setting active my panel button with id "editorCK"
Hi @artf , When I drag and drop a Image block within the canvas it triggers the active event for the image block thats runs the openModal method. Shows a modal to upload the image. I'm trying to run editor.addComponents({ type: 'image' }); and shows the modal to upload the image. I didn't find any API methods that pro...
arthuralmeidap
yes, you are right @artf . I didn't think about dumb cases like that you mentioned. It worked very fine to me. I just thought if was not the case to embedded such behaviour within the addComponents or somewhere else. Thanks for all the hel...
arthuralmeidap
@chiqui3d, thanks for the feedback but the image block was just an example. In my case I have created a new Type and I was trying to trigger the active event for my component. It works exactly like the image block that's why I used the ima...
chiqui3d
I think this will help you. editor.runCommand('open-assets'); https://github.com/artf/grapesjs/wiki/Assets
I hope to explain well, when I edit a link I don't see the possibility of editing the text of that link. I think it would be a good idea if that link doesn't have children, such as an image, it should display the text field in the style manager settings. Thanks
artf
The Link extends Text Component so you just have to double-click on it to start editing
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, I want to disable to select, hover or edit the components of the editor when the Mobile view is on. I have tried using below code. But it removes all the components from the editor. Can you please help me out? Thanks,
artf
Probably because you're passing a collection (wrapperChildren) to updateAll which expects a 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.