Skip to content

Commit

Permalink
set ace base path in styleguide
Browse files Browse the repository at this point in the history
  • Loading branch information
biyeun committed Nov 15, 2023
1 parent e746c92 commit f497637
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions corehq/apps/styleguide/static/styleguide/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
$(function () {
'use strict';
let initialPageData = hqImport("hqwebapp/js/initial_page_data");
ace.config.set('basePath', initialPageData.get('ace_base_path'));
_.each(["python", "html", "js"], function (lang) {
$('pre[data-lang="' + lang + '"]').each(function () {
let editor = ace.edit($(this).get(0), {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ <h6>Quick Links</h6>
</div>
</footer>

{% initial_page_data 'ace_base_path' 'ace-builds/src-min-noconflict'|static %}

{# Knockout component templates #}
{% include 'hqwebapp/partials/bootstrap5/ko_pagination.html' %}
{% include 'hqwebapp/partials/bootstrap5/ko_inline_edit.html' %}
Expand Down

0 comments on commit f497637

Please sign in to comment.