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

RFC:Nested combinations #93

Open
Fi2zz opened this issue Dec 18, 2023 · 0 comments
Open

RFC:Nested combinations #93

Fi2zz opened this issue Dec 18, 2023 · 0 comments

Comments

@Fi2zz
Copy link

Fi2zz commented Dec 18, 2023

let delta = [
	{
		attributes: {
			type: "bullet-list-container",
		},
		children: [
			{ insert: "Child 1" },
			{ insert: "Child 2" },
			{
				insert: "Child 3",
				attributes: { type: "bullet-list-container" },
				children: [{ insert: "Sub Child 1" }, { insert: "Sub Child 2" }],
			},
		],
	},
];

// output  to

/**


    <ul>
        <li>Child 1</li>
        <li>Child 2</li>
        <li>Child 3
                <ul>
                    <li>Sub Child 1</li>
                    <li>Sub Child 2</li>
                </ul>
        </li>

    </ul>



 */
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

1 participant