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

Ability to save, edit and use snippets #193

Closed
nickjl opened this issue Nov 24, 2017 · 6 comments
Closed

Ability to save, edit and use snippets #193

nickjl opened this issue Nov 24, 2017 · 6 comments
Labels
Milestone

Comments

@nickjl
Copy link

nickjl commented Nov 24, 2017

I'm currently trying to use the app for our marketing team to create emails without having to come through the development team and without them having to using gulp.

The main thing that's preventing this is the lack of a snippets feature. I feel it would be extremely useful to be able to set up snippets to ensure that anyone using the app that's not very technical doesn't miss any important attributes out.

Is there any scope for this to happen?

Thanks

@meriadec
Copy link
Contributor

That's interesting. Do you know libraries that could help bring that? Feel free to do a little POC that we could iterate on!

@nickjl
Copy link
Author

nickjl commented Nov 24, 2017

Hi @meriadec,

I thought along the same lines as Atoms snippets could be good, just needing to edit one snippets.cson file to add them.

https://github.com/atom/snippets and https://github.com/atom/autocomplete-snippets

I'll have a further dig around too :)

@jbickelhaupt
Copy link
Contributor

jbickelhaupt commented Dec 14, 2017

I'm adding a +1 for some kind of Snippets feature. Just spoke with @meriadec and @nico about this yesterday over Slack.

My design team would LOVE to have somewhere to bookmark little pieces of code that they use on a regular basis in different emails—whether it be certain logos, 2-column section layouts, or specific headlines or text. I'm trying to get them out of Adobe Dreamweaver (which has this feature too) and into the MJML desktop app for full-time development.

@meriadec
Copy link
Contributor

meriadec commented Mar 6, 2018

@ngarnier any ideas of ideal workflow to handle snippets? 😉

@meriadec meriadec changed the title Snippets Feature Ability to save, edit and use snippets Mar 7, 2018
@ngarnier
Copy link
Member

ngarnier commented Mar 7, 2018

@meriadec, yes! Here is how I imagine that:

  1. Add a "snippets" entry in the builder
  2. When the user goes to the snippets area, they can:
  • See created snippets
  • Create a new one by providing:
    • a name
    • a trigger
    • a content
  1. Each time the user types the trigger and clicks tab in the builder, the trigger is replaced by the content

Pending questions:

  • Where should the "snippets" entry be? To me, it makes most sense in the "Settings" area of the app as the dropdown is really action-orented
  • Should we enforce a syntax, or accept any kind of trigger?
  • Where should we store the snippets, settings.json?

@ngarnier ngarnier added this to the 2.9.0 milestone Apr 9, 2018
@ngarnier
Copy link
Member

ngarnier commented Apr 9, 2018

Released with v2.9.0!

@ngarnier ngarnier closed this as completed Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants