title: JavaScript return html content in that specific code
body: <p>I have the following code:</p>
  
  <pre><code>var currentusername = Discourse.User.currentProp('username');
  
  if (currentusername == "crazy-geek") {
  
  
      api.createWidget('admin-menu', {
          tagName: 'div.admin-panel',
  
          panelContents() {
              return "hello " + currentusername;
          },
  
          html() {
              return this.attach('menu-panel', {
                  contents: () =&gt; this.panelContents()
              });
          },
  
          clickOutside() {
              this.sendWidgetAction('toggleAdmin');
          }
      });
  
      api.decorateWidget('header-icons:after', function (helper) {
          const headerState = helper.widget.parentWidget.state;
          let contents = [];
          contents.push(helper.attach('header-dropdown', {
              title: 'admin-menu',
              icon: 'asterisk',
              active: headerState.adminVisible,
              iconId: 'toggle-admin-menu',
              action: 'toggleAdmin',
          }));
          if (headerState.adminVisible) {
              contents.push(helper.attach('admin-menu'));
          }
          return contents;
      });
  
      api.attachWidgetAction('header', 'toggleAdmin', function () {
          this.state.adminVisible = !this.state.adminVisible;
      });
  
  };
  </code></pre>
  
  <p>I need to return html content in the following part:</p>
  
  <pre><code>        panelContents() {
              return "hello " + currentusername;
          },
  </code></pre>
  
  <p>So the part "hello " + currentusername; needs to be replaced with specific html content, as for my example that will be a small menu with some links inside.</p>
  
  <p>How can I archieve that?</p>