#2245September 5, 2019by vivek106881 answer
hello all , I am using version 0.15.3 and want to save html data with inline css to server side this is my code where I am storing html to local-storage first and than sending it using storage manager . I want to know is there any way where I can send html with inline css without storing it into local-storage or by us...
artf
Refer to the command used in Newsletter preset to inline CSS https://github.com/artf/grapesjs-preset-newsletter/blob/master/src/openExportCommand.js by default there is no way to do that
#2244September 5, 2019by arievanden1 answer
When you click on a text node, the cursor is at the beginning of the block. Clicking again doesn't move the cursor into position when you want to insert more text, so you must use the arrow key to move the cursor into position. Not a big deal, but it would be great if when you click on a text node to edit that it woul...
artf
Indeed, this is how it should work... It's due to this bug #2210 Already fixed and ready for the next release (hope to publish it this week) For now, you have to disable config.domComponents.draggableComponents feature
#2242September 5, 2019by parmando3 answers
Hello, how do I change "- State -" and "Selected" I need to translate this ... Thank you
artf
Comes from selector manager configuration
parmando
Thank you! Where can I find a full map "map" for me to translate?
artf
Sorry there is no full map at the moment, each module has its own options for strings
#2241September 4, 2019by adriangroch1 answer
When the rte section of the editor config is defined, I'm assuming that the defined default actions should reflect the actions array: Meaning that this should should only render the bold action Instead all default actions are instantiated: 'bold', 'italic', 'underline', 'strikethrough', 'link' See: https://codesandbox...
artf
mmm wrong key in docs... it should be thanks for the report
#2239September 3, 2019by Ramkumar-Murugesan1 answer
Hi guys, has I know that we use external string values in script function by assigning the variable with value in custom triats. but I tried to pass the object or array. I didn't get the correct values. i really stuck on it can anyone please help me. my traits:- screenshots in the above screenshot. myModelCount value...
artf
@Ramkumar-Murugesan objects/arrays are not supported yet, we'll add them in the next release. For now, if you need an object/array in the script, create another property with a JSON.stringify version of the original (set a listener on orig...
#2238September 2, 2019by abozhinov3 answers
Hi @artf, can you please tell me what is the fastest and easies way to extract component styles. I have template and in this template you can edit part of header, footer and add content between them. I don't store the whole template just the content in the middle, header & footer. component structure is easy I loop th...
abozhinov
I don't see a problem with media queries. The rules are detected by selector and everything works fine. I add class and set style only for mobile and it works.
artf
Yeah, styles are in a different container (editor.CssComposer.getAll()) so it's a bit harder and there is no API for extracting all matching styles. What I'd suggest doing something like this BTW this is not a final solution, definitely, y...
#2237September 2, 2019by gabd14112 answers
Hi! Is there a way to get general, last editor updates using editor.on('update') event? Something like this: editor.on('update', e => { // get the event // get the specific, recent updates (HTML and CSS) })
olgertpysqyli
Hello. You can declare variables for html, css and js and their value is going to get updated every time when editor change event is triggered. change() { this.html = editor.getHtml(); this.css = edito...
gabd1411
I've found another available event, editor.on('change'), but it seems difficult to read the HTML and CSS updates from this event
#2236September 2, 2019by makkaronis4e1 answer
Is there any way to replace all default icons with SVG? I know that it is in roadmap, but maybe there is a way how can we do it now manually?
artf
Default icons are applied via classes so the only way is not to use them and add a custom SVGs inside the target element. BTW the current active issue about this is here #644
#2235September 1, 2019by damey20111 answer
Great project.. I'm trying to integrate this and I have this issue. Assuming I have a style for Desktop already and I add a new style for mobile for example, instead of creating a media query for mobile, it overwrites it without creating any media query. Any help ?
artf
Please @damey2011 follow the [BUG] template when you open an issue like this, with the current information it's impossible to us give you any valid help
#2234August 30, 2019by arievanden3 answers
Hello and thank you for GrapesJS. It's awesome. I do have a question that I haven't been able to find an answer to. I'm using PHP/Yii and MySQL db. Your example for external storage config:storageManager: { type: 'remote', urlStore: 'http://endpoint/store-template/some-id-123', urlLoad: 'http://endpoint/load-template/...
smik3
Is there any reason why you can't use PHP to save it directly as a JSON file rather than on the database?
arievanden
I probably could, but we need to saved to DB. I'm OK, a developer figured it out for me, but it would be great to have some more detailed code examples for use with php/mySQL. Your docs are great, but this would be a nice addition to your...
artf
My problem is that I'm trying to get the HTML to JSON conversion formatted properly GrapesJS, by default, generates 4 types of data: HTML, CSS, Components (JSON from HTML), Styles (JSON from CSS) So you shouldn't do any kind of conversion....