Skip to content

Include the Emmet plugin as a codemirror option.#5874

Closed
okonomiyaki3000 wants to merge 1 commit intojoomla:stagingfrom
okonomiyaki3000:emmet
Closed

Include the Emmet plugin as a codemirror option.#5874
okonomiyaki3000 wants to merge 1 commit intojoomla:stagingfrom
okonomiyaki3000:emmet

Conversation

@okonomiyaki3000
Copy link
Copy Markdown
Contributor

This was requested over in #5863

There's already a third party plugin that provides Emmet functionality but it does not work in the template editor. This will allow Emmet to be used anywhere CodeMirror is used.

@bluezeyes-zz
Copy link
Copy Markdown

@okonomiyaki3000 Thanks! I would really appreciate when this get into next version.

As emmet have a build-in list for abbreviations in flavours of html, css, etc it could be extended too (with an own snippets.json) which could be used by joomla to provide snippets for common tasks,
like php snippets for expanding j3:jdimt to <jdoc:include type="modules" name="title" /> as an example

This could extended to an internal set of abbreviations and snippets with the set of current function calls, includes, etc. (pattern) to support developers, template designers, advanced users as help to create or modify their modules, components, templates. (Snippets anyone?)

To give this ability, there should be an ajax function to load the snippet.js into emmet.
A short note how to do this i found here: http://stackoverflow.com/questions/25215959/how-to-customize-emmet-snippets-json-for-codemirror

Interessting the answer from Sergey Chikuyonok, the developer of Emmet.
Maybe he have already those Ajax-funktions which could be used...

That would give the user of joomla a chance to use their own snippets within CM and Emmet.

@Bakual Bakual added this to the Joomla! 3.5.0 milestone Jan 23, 2015
@Bakual Bakual added the Feature label Jan 23, 2015
@okonomiyaki3000
Copy link
Copy Markdown
Contributor Author

This may need a few changes once #6150 is merged.

@okonomiyaki3000
Copy link
Copy Markdown
Contributor Author

I had a better idea about how to do some things over at #5863 and that will affect this PR too. Basically, if that one is merged, Emmet can be done as a separate plugin which means that it can either be merged and distributed with Joomla or, if there's not enough interest in that, it can be packaged separately and installed only by people who are interested in it.

So, please don't merge this yet. Let's get #5863 merged first and then decide what to do about this.

@zero-24 zero-24 added the Language Change This is for Translators label Jun 16, 2015
@zero-24 zero-24 removed this from the Joomla! 3.5.0 milestone Oct 9, 2015
@roland-d
Copy link
Copy Markdown
Contributor

@okonomiyaki3000 Now that #5863 has been merged, what to do with this?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5874.

@okonomiyaki3000
Copy link
Copy Markdown
Contributor Author

#5863 changed quite a bit by the time it was merged from when I first proposed it. This PR is not really still relevant because I gave the CodeMirror plugin a plugin group of its own. So an addon like this should really be a separate plugin now. I'm going to close this and remake it that way in the near future. I probably won't propose it as a PR for Joomla though. It can just be a plugin that people can install only if they want to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Language Change This is for Translators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants