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

[export html] Logic to avoid nesting? #204

Open
Lzok opened this issue Dec 7, 2019 · 0 comments
Open

[export html] Logic to avoid nesting? #204

Lzok opened this issue Dec 7, 2019 · 0 comments

Comments

@Lzok
Copy link

Lzok commented Dec 7, 2019

Hello all, how are you?

This library works great except for one thing I'm trying to achieve and I don't find how to. Here's my example:

If I have the exact same text both with bold and italic, I want the wrapper span has the two classes.
This is a dummy text.
With the previous text, I want the result

This is <span class="-bold -italic>a dummy</span> text.

But instead I'm receiving

This is <span class="-bold><span class="-italic"> a dummy</span></span> text.

Here's my current options object

const options = {
	inlineStyles: {
		BOLD: { element: 'span', attributes: { className: '-bold' } },
		ITALIC: { element: 'span', attributes: { className: '-italic' } },
	},
	defaultBlockTag: null,
};

I tried playing with the block renderers and such without luck.

Please let me know if you need more information here.

Related issue with no solution

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