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

in content display html content #721

Open
Paul75 opened this issue Oct 5, 2023 · 1 comment
Open

in content display html content #721

Paul75 opened this issue Oct 5, 2023 · 1 comment

Comments

@Paul75
Copy link

Paul75 commented Oct 5, 2023

Hello,

When I can display in the content with html content ?

For exemple I want to add text seams :

Dupont Jean
------------------
Fred Dupont
Roger RRRRR
Mike Jason

... with links in lines for exemple ....

Thanks

@dabeng
Copy link
Owner

dabeng commented Dec 22, 2023

Hi @Paul75 I create a demo on codepen.io for you -- https://codepen.io/dabeng-the-styleful/pen/YzgzEGp . The core snippets are shown below:

    var nodeTemplate = function(data) {
      return `
        <div class="title">${data.name}</div>
        <div class="content">
          ${data.members.map(member => `
            <li>${member.name}</li>
          `).join('')}
        </div>
      `;
    };

    var oc = $('#chart-container').orgchart({
      'data' : ds,
      'nodeTemplate': nodeTemplate
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants