[QUESTION] Adding component via text editor
Is it possible to add custom or default(for example "Link") Component on caret by clicking button in ckeditor?
artf
no, you can't do it while you're in editing mode
Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.
3464 issues found
Is it possible to add custom or default(for example "Link") Component on caret by clicking button in ckeditor?
artf
no, you can't do it while you're in editing mode
editor.DomComponents.getWrapper().getEl().insertAdjacentHTML('beforeBegin', letBlock) letBlock letblock is a variable that contains HTML. Question:How to remove this adjacent HTML?is there a function like "insertAdjacentCSS()"?
zgover
You touched on a few questions here, but to get to your first in your headline; reference the BlockManager api docs here e.g.
artf
You're mixing too much stuff in one question and without any context
froderf
@artf I just wanted to remove the new block that I added via editor.DomComponents.getWrapper().getEl().insertAdjacentHTML();
Hi @artf , We have created a custom asset manager which is working perfectly for image component. However we are not able to call custom asset manager for background image. Tried to access using this methods var stm = editor.StyleManager; var fileType = stm.getType('file'); stm.addType('file',{ model: fileType.model,...
artf
Hi @sdrebel can you show us your implementation of custom asset manager? If you have followed this you should see it also in the Style manager
no-response[bot]
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take ac...
Hi @artf , Is there a way to modify the attribute where the classes are placed? (default: class) is there also a way to change the position and tag of the styles? (default: <style>)
artf
Is there a way to modify the attribute where the classes are placed? (default: class) Not really, the only thing you can do now is to extend methods from base components. This is where is assigned in the model (used in the final HTML code)...
There is a way to show "Component settings tab" on component click? I'm trying editor.on('component:update', function(propertyName)... but I cannot find a way to show the second tab ("Component Settings")
selcukcura
Here's a cleaner approach:
miky9585
Thank's @selcukcura
miky9585
I've solved in this way. But I'ld have a more grapesjs friendly solution editor.on('component:update', function(propertyName){ if(typeof propertyName.changed.status != 'undefined' && propertyName.changed.status == "selected"){ $('[data-ori...
Hi, Great project, thanks! In relation to issue #1936 there is a bug on the following line which causes exceptions when attempting to drag an absolute component when the variable editor is not defined in the window scope, for example, if you have instantiated the editor inside a React class, or not used the name edito...
Hi @artf, use the last version (npm). I have a problem when using clearStyles. When try to get CSS everything is clear and nice, but when Style is saved in the database unused rules are still there.
Im currently using PHP to upload to my MySQL database. I heard it is best to save everything as TEXT or MEDIUMTEXT. But the question is, how should I protect everything and make sure no one is uploading malicious code? I am using the custom code plugin as well so the user can add custom javascript code, but how can I...
artf
Sorry but this question is totally off topic here, try to use Stack Overflow for similar doubts
Hi all, great JS plugin btw! Im new to programming and i would like to know a few things: I want to set the icon as a "heading" icon from font awesome but it not doing it and its not throwing any error. thanks to everyone for all the help and great plugin!
paigefos1
Never mind, it was because I put it in editor.onload, it should be outside of onload
Hello, thanks for the hardwork, grapesjs is very good :) Just wondering, is it possible to add multiple blockmanagers on one editor ? The code hereunder won't work for me : grapesjs.init({ blockManager: [ { appendTo: '#albumeditorpanelleft', blocks: [ ... ] }, { appendTo: '#albumeditorpanelright', blocks: [ ... ] } ],...
artf
Yes, use the blockManager.render() method with external option set to true