Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roadmap #74

Closed
28 of 32 tasks
artf opened this issue Apr 18, 2017 · 51 comments
Closed
28 of 32 tasks

Roadmap #74

artf opened this issue Apr 18, 2017 · 51 comments

Comments

@artf
Copy link
Member

artf commented Apr 18, 2017

This issue is a rough outline of some improvements/features we'd like to add to the editor.
To keep things cleaner it's better to open a new issue for any discussion about a related feature (then linked here) and use this one just for general questions/requests.
Don't hesitate to propose other stuff for the list and, of course, any kind of help is extremely welcome.
Each section is ordered by priority (discussable).

Features

Plugins

Codebase

  • Get rid of jquery. The data() method is probably the only one which is strictly required by the editor
  • Get rid of grunt in favor of npm scripts
  • Get rid of requirejs in favor of webpack as a bundler
  • Enable to write ES6
  • Get rid of font-awesome https://github.com/artf/grapesjs/releases/tag/v0.15.9
@aloksharma1
Copy link

are you on gitter, also how about adding bootstrap support in the roadmap?

@artf
Copy link
Member Author

artf commented Apr 19, 2017

are you on gitter

not yet :)

Exactly, what do you mean by 'adding bootstrap'? If you're talking about loading external styles inside the template, you're already able to do so, check this issue for example

@aloksharma1
Copy link

i mean adding bootstrap components in drag-drop builder, for easy build up of websites.

@artf
Copy link
Member Author

artf commented Apr 20, 2017

well, yeah, I add it to plugins

@givanz
Copy link
Contributor

givanz commented Apr 29, 2017

Hi

Congratulations, GrapeJs looks awesome, the most feature rich and cleanly coded open source online html editor by far.

There are some features that might make it even better in my option, here are some of my proposals.

Can the components tab be changed to show as a panel on the left? Most editors have properties and blocks shown at the same time for easier editing (jetstrap, http://ionic.io/products/creator etc).

When I click on a block, for example on map block (after adding it), I must click settings to see the block settings and to configure the map, I think that it would be easier for blocks to show settings by default or even better have only one tab for both settings and style and show settings first.

Can the interface colors/theme be easily changed by editting a scss/less file or something similar? to have different themes like one with white background.

Is it possible to toggle the elements grids (dashed boxes) by config or button? It looks cleaner without them and if it used mainly for editing editing blocks and not html elements (regular users without css/html knowledge) it might not be very useful.

Is it possible to have an option to limit highlighting/editing to only some elements (only blocks without html elements for example) on the page? I plan to use grapejs in an open source cms I'm developing and this option is helpful to limit editing only to blocks for users that are not familiar with html/css.

Is there any documentation/examples on how to add new blocks or change settings?

Thanks.

@artf
Copy link
Member Author

artf commented May 2, 2017

Thanks @givanz for your kind words and suggestions.
About blocks, shown always on the left, could be a cool idea but not in the way how the canvas is now rendered. I'd like to keep canvas as wide as possible and with another side panel the view will be too much squashed. But this is just my opinion, you could easily move the block container wherever you want.

I definitely agree about 'Settings panel', I think an additional option could be a solution. Anyway I've not yet figured out the best/easiest way to manage the UI (panels, buttons, etc.) for devs, therefore all that part it's just a default set (but can be easily moved around with js).

No 'theme' options for the moment, but you can easily change the entire UI with few CSS changes
change-ui

#gjs-rte-toolbar, .gjs-bg-main, .gjs-clm-select option, .gjs-clm-tags .gjs-sm-colorp-c, .gjs-editor, .gjs-mdl-dialog, .gjs-nv-item .gjs-nv-title-c, .gjs-off-prv, .gjs-pn-panel, .gjs-select option, .gjs-sm-sector .gjs-sm-colorp-c, .gjs-sm-select option, .gjs-sm-unit option, .sp-container, .gjs-block {
    background-color: white;
}
#gjs-rte-toolbar .gjs-rte-btn, .gjs-btn-prim, .gjs-btnt, .gjs-clm-tags .gjs-sm-composite.gjs-clm-field, .gjs-clm-tags .gjs-sm-field.gjs-sm-composite, .gjs-clm-tags .gjs-sm-stack #gjs-sm-add, .gjs-color-main, .gjs-mdl-dialog, .gjs-off-prv, .gjs-pn-btn, .gjs-pn-panel, .gjs-sm-sector .gjs-sm-composite.gjs-clm-field, .gjs-sm-sector .gjs-sm-field.gjs-sm-composite, .gjs-sm-sector .gjs-sm-stack #gjs-sm-add {
    color: #777;
}
.gjs-btnt.gjs-pn-active, .gjs-color-active, .gjs-pn-btn.gjs-pn-active, .gjs-pn-btn:active, .gjs-block:hover {
    color: #59a6e6;
}
.gjs-btnt.gjs-pn-active, .gjs-pn-btn.gjs-pn-active {
    background-color: rgba(0, 0, 0, 0.03);
}

You can already disable dashed boxes in demo
change-switch

For creating new Blocks I suggest you check this wiki there you should also find how to change components properties (eg. make element not editable)

@meteorsnows
Copy link

meteorsnows commented Jun 5, 2017

For Absolute/Designer mode, There is feature like Smart Guide Line / Snapping to Object, which Simex also not having this feature.

One picture worth thousand word, that align feature most of us used in Microsoft Office to align object:
https://www.edrawsoft.com/flowchart.php
http://www.guidingtech.com/52926/smart-guide-optimization-powerpoint/

@artf
Copy link
Member Author

artf commented Jun 6, 2017

thanks @meteorsnows, smart guides and snapping are definitely a must in Designer mode so I've already considered it

@ShinJii89
Copy link

Hi,
Are you planning add possibility to paste for example in import javascript code? Because now when I import some page with html, css & javascript, your builder cut off all JS code :D

@artf
Copy link
Member Author

artf commented Jun 19, 2017

@ShinJii89 Scripts are just ignored by configurations.
If you want to try it in the demo, you have to paste this in devtools:

editor.getConfig().allowScripts = 1

@integrateddigital
Copy link

Hi @artf and everyone,

I would be happy to contribute with a plugin that offers the ability to use Google's File and Image picker instead of the filestack one ( mainly because of the cost of FileStack .. ) ... I am currently coding it anyways, and if there's interest then I would be happy to place it in git.. txs again for the great library.

@lexoyo
Copy link
Contributor

lexoyo commented Jun 23, 2017

@integrateddigital I use unifile which provide routes to manage files with dropbox, ftp, github... and it is easy to add new services so you could use it (even as a canvas for 1 service it is interesting)
https://github.com/silexlabs/unifile

@integrateddigital
Copy link

thanks @lexoyo , does unifile allow image search by keyword ? that's the actual specific functionality that I want to replicate ... good timing as I've just realized the google image picker might not be ideal as it does bring ads; If I can type a keyword, get back images then it's good, suggestions welcome...

@lexoyo
Copy link
Contributor

lexoyo commented Jun 23, 2017

Nice! I'd like to have this functionality. The code is really clean and a state of the art in nodejs, so it should be feasible without headaches, I'll poke the lead developer @JbIPS to know for sure

@integrateddigital
Copy link

It's very handy, the gjs-plugin-filestack does have that, but it is too costly per month,.... i'm playing with a couple of other pickers right now, ... engagement goes very high when you allow the user to fetch images without having to switch tabs or windows... let me know and I will let you know .. :-)

@JbIPS
Copy link

JbIPS commented Jun 23, 2017

Hello! I've been invoked here to talk about unifile. To be clear, unifile is a nodejs library that replicate the filesystem module but for cloud storage (GitHub, Dropbox, WebDAV, FTP SFTP,...). It let you manipulate files so you could use it to search images but you'll have to implement that yourself (I'd be glad to help).

@vinzee
Copy link

vinzee commented Jun 30, 2017

Hello, I really appreciate the work you guys are doing and the fact that such a library is open source.

I would be happy to contribute to as I have worked on a product very similar to this one created using backboneJS & marionetteJS along with Rails on the backend. We had a async save, a peer-to-peer sync and a template manager in place along with all the stuff currently present here.

Is there a gitter / slack channel wherein we can discuss ?

@artf
Copy link
Member Author

artf commented Jul 3, 2017

Thanks @vinzee I'd really appreciate any help, something such as template manager would be awesome to have. If you want to discuss anything related to grapesjs I think "Github's Issues" is all we need, it'd be a mess tracking stuff with more discussion channels.

@rgcarrasqueira
Copy link

Hey Artur! How to contribute with translating for other languages. I would like to translate it to Brazilian Portuguese?

@artf
Copy link
Member Author

artf commented Jul 5, 2017

Hi @rgcarrasqueira you can check #26 about i18n and why I don't plan to add it

@rgcarrasqueira
Copy link

Hey Art!

I've tweak some stuffs on my editor and I create a way to open a template gallery, choose a layout and set it at the canvas, I'm sharing the code above:

cmdm.add('choose-layout',{
        run(editor, sender) {
            var layout_id = opts.id
            var url  = "http://localhost/template/id.json";
            url = url.replace('123', layout_id);

            $.getJSON(url, function(data){
                var html_code = data.message
                var iframe = $('iframe.gjs-frame'); // or some other selector to get the iframe
                $('#wrapper', iframe.contents()).html('')
                comps.clear();
                localStorage.clear();
                comps.getWrapper().set('content', '');
                opts.editor.setComponents(html_code);
            });
            // once chosen a layout close the modal window
            $('#choose-layout-modal').modal('hide');
        }
    });
    
    cmdm.add('open-layout-list',{
        run(editor, sender) {
            sender.set('active', 0);
            // opens a bootstrap modal
            $('#choose-layout-modal').modal('show').load("{% url email-template-layout-list %}");
        }
    })
    
    pnm.addButton('options', {
        id: 'open-modal-layout-list',
        className: 'fa fa-newspaper-o',
        command: 'open-layout-list',
        attributes: {
            'title': 'Choose a layout',
            'data-tooltip-pos': 'bottom',
        },
        active: false,
    });

Hope that it helps!

@rgcarrasqueira
Copy link

Hi Art!

For the custom code editor I've did at my project:


   cmdm.add('export-template', {
        run(editor, sender) {
            sender.set('active', 0);
            // used a bootstrap modal
            $('#source-code').modal('show');
            $('#source-code').modal({
                backdrop: 'static',
                keyboard: false
            })
        }
    });

    var ViewCodeBtn = editor.Panels.getButton('options', 'export-template');
    ViewCodeBtn.set('command', 'export-template');
    
    codeViewer = editor && editor.CodeManager.getViewer('CodeMirror').clone();
    
    codeViewer.set({
        codeName: 'htmlmixed',
        readOnly: 0,
        theme: 'hopscotch',
        autoBeautify: true,
        autoCloseTags: true,
        autoCloseBrackets: true,
        styleActiveLine: true,
        smartIndent: true,
    });
    
    codeViewer.init(document.getElementById('code'));
    viewer = codeViewer.editor;
    
    function updatePreview() {
        var iframe = $('iframe.gjs-frame'); // or some other selector to get the iframe
        
        html_code = cmdm.get('gjs-get-inlined-html').run(editor)

        if(viewer.getValue()){
            html_code = viewer.getValue()
        }

        $('#wrapper', iframe.contents()).html('')
        editor.DomComponents.getWrapper().set('content', '');
        editor.setComponents(html_code);
    }
    
    var delay;
    
    viewer.on("change", function() {
        clearTimeout(delay);
        delay = setTimeout(updatePreview, 300);
    });

    viewer.refresh();

    setTimeout(updatePreview, 300);

It is running like a charm

@artf
Copy link
Member Author

artf commented Aug 16, 2017

thanks @rgcarrasqueira 👍 I'll try to make a good use of your code

@Geczy
Copy link

Geczy commented Aug 22, 2017

Any updates on the jQuery deprecation? Wanting to use GrapesJS in a ReactJS application, and it doesn't make sense to load jQuery

@Jogai
Copy link

Jogai commented Mar 15, 2018

Regarding font-awesome, bootstrap-select makes it an option to specify on initialization which I like. It would need a mapping for icons that have different names. (Boostrap-select only has one icon, so thats easy for them). That way its always possible to use icons you already have in your project instead of pulling in another dependency.

The component toolbar is easy to customize (for example I just add data-gjs-removable="false" to an element in my template and thats enough) but there is no option to hide the "select-parent" command. An attribute like "traverse" would be helpful for me (i'm just dumbing the editor down for my users)

@artf
Copy link
Member Author

artf commented Sep 20, 2018

Custom CSS parsers available from https://github.com/artf/grapesjs/releases/tag/v0.14.33
Created also for that case https://github.com/artf/grapesjs-parser-postcss

@FrciSmrci
Copy link

@artf Do you have an estimate on when the following feature is going to be released => Custom color picker. eg. as with RTE using editor.setCustomRte() it might be editor.setCustomColorPicker()?

@artf
Copy link
Member Author

artf commented Oct 30, 2018

@FrciSmrci unfortunately, I didn't plan it yet and IMHO I'm not even sure anymore if it's the correct way of customization. Probably it would be better to create some kind of customizable UI system, where the developer can change/update the color input itself (as all other inputs) and not only the color picker

@loganvolkers
Copy link
Contributor

We actually have a custom color picker wired up with GrapesJS.

What we did:

  • Create a whole new panel for editing traits
  • Connect the panel to the Backbone model for list of components and currently selected component
  • Embed a custom tree view with embedded JSON Schema Forms

Here's the result:

image

Ideally the forms used in Grapes would be more pluggable without that work, though.

@artf if you're looking for inspiration, then JSON Schema auto-generated forms may serve as a good start. I'm a fan of React JSON Schema Forms because it makes it very easy to add custom widgets or fields components, override styling, titles, helptext, etc.

@Sibbir7350
Copy link

Sibbir7350 commented Jan 10, 2019

Hello @artf
#327 I just wanted to know is there sample code for drag and drop.. I am having difficulty while wanted to drag component inside the canvas.. My aim is to move the element by absolute position.. not by sorting

@luisalvarado
Copy link

Hi @artf , just to understand the design mode better, will this allow me to drag an element (link, div, span, anything..) around the page and position it in a specific place. More like a more intuitive, drag & drop replacement for the current one and allow the use to organize items in the way that is not restricted by the current block concept?

@artf
Copy link
Member Author

artf commented Feb 6, 2019

@luisalvarado correct. As a tiny update, I've started working on a new feature which, once finished, will allow me to add the designer mode easily.

@luisalvarado
Copy link

@artf This is beautiful, thank you.

@artf artf pinned this issue Feb 26, 2019
@jakemonton
Copy link

@artf I'm excited about the design mode feature!

@artf
Copy link
Member Author

artf commented Mar 22, 2019

@jakemonton actually, I started working on it a few days ago, I hope to post soon a new follow-up issue describing it more in details

@artf
Copy link
Member Author

artf commented Apr 1, 2019

A new issue about the Designer mode: #1936

@jitterbox
Copy link

Has there been any work done on the Template Management plugin feature to date, or that might be done soon?

@artf
Copy link
Member Author

artf commented Jul 31, 2021

@artf
Copy link
Member Author

artf commented Aug 10, 2023

Closing this in favor of the new Roadmap process

@artf artf closed this as completed Aug 10, 2023
@GrapesJS GrapesJS locked and limited conversation to collaborators Aug 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests