I believe they’re set in /bb-plugin/includes/field-code.php/. However, I have just this moment attempted the instructions you provided and couldn’t get it to work.
I haven’t used Emmet before, but from my quick read of it. Am I right in thinking that if I was to type html:5 and then press tab. It should convert that to a basic HTML5 template?
Yes, as @mike mentioned, it is a great time-saver. You can code HTML very quickly with its auto-completion shortcuts.
OK guys, I got it working! Here’s what I did (this is the quick-and-dirty version, will clean it up later):
saved https://github.com/nightwing/emmet-core/blob/master/emmet.js to themes/bb-theme-child/lib/js/emmet.js
in the functions.php added: wp_enqueue_script( 'emmet', get_stylesheet_directory_uri() . '/lib/js/emmet.js' );
in plugins/bb-plugin/classes/class-fl-builder.php underneath line 473 (wp_enqueue_script('ace-language-tools'...) added: wp_enqueue_script('ace-emmet', $js_url . 'ace/ext-emmet.js', array(), $ver, true);
in plugins/bb-plugin/includes/field-code.php under line 18 (ace.require('ace/ext/language_tools');) added: ace.require('ace/ext/emmet');
in plugins/bb-plugin/includes/field-code.php under line 28 (enableSnippets: false) added (NOTE: don't forget to add a comma at the end line 28): enableEmmet: true
That did the trick for me.
This just makes me love using BBuilder even more! (saves me the trouble of flipping between Sublime Text to quickly create the HTML I want and pasting it into BB’s HTML Module).
For more info, check out: http://emmet.io/ (I have no affiliation, just love the tool)
I find it most useful when coding tables, for example, after adding Emmet to your HTML module, try: table#my-table.table.table-bordered.table-striped>tr5>lorem2.my-cell4
then press the tab key.
I’ve created a plugin to add Emmet to any Beaver Builder HTML Module installation thus avoiding the need for the above installation steps (and avoiding the inevitable overwrite with a BB update).
In the future, I’ll enhance the plugin to enable further customization of the HTML module’s Ace editor (if there is enough interest).
Where’s the best place to upload/share this plugin? (keep in mind it is strictly in it’s early stages)
That’s really awesome about the plugin, and so cool of you to share it! Thanks, we really appreciate it.
We don’t really have any place where you can share 3rd party BB enhancement stuff. But you can leave a link here where we can get your plugin. Searching for emmet should bring it up!
Also, feel free to share it on the BB FB Group and/or Slack Channel. We’ve a lot of active users there and some of them may just need it.