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

background-color: initial span added to joined paragraphs #523

Closed
gavindphillips opened this issue Mar 20, 2017 · 4 comments
Closed

background-color: initial span added to joined paragraphs #523

gavindphillips opened this issue Mar 20, 2017 · 4 comments

Comments

@gavindphillips
Copy link

gavindphillips commented Mar 20, 2017

Before report an issue, be sure to put these informations. Thanks :)

Informations

Browser + version: Chrome 56.0.2924.87
OS: macOS Sierra
Resolution: 2560 x 1440

How to reproduce the bug?

Firstly, thanks for Trumbowyg, excellent piece of work.

I'm not sure if the issue I've noticed is anything to do with Trumbowyg as I can't find any reference to it in the source.

When you delete a line between two paragraphs the second paragraph is wrapped with <span style="background-color: initial;"></span>

Any subsequent paragraph is then also wrapped in this span.

If you highlight the paragraph and click the remove format button the span is removed, the p tag remains. Incidentally the remove format button doesn't seem to work on other tags.

Here are the options it's loading with

 $(function() {
     $('#body').trumbowyg(
     	{ 
     		svgPath: '/vendor/trumbowyg/icons/trumbowygicons.svg',
     		semantic: false,
     		resetCss: true,
     		removeformatPasted: true
     	}
     );
});

This is version: "2.5.1" bundled by webpack.

Cheers

@gavindphillips
Copy link
Author

Been looking into this. Ignore the comment about the remove format button not working, it's fine.

This issue only seems to affect Chrome. It also only seems to happen when resetCSS is true.

I can't make the connection between the reset css styles and what's being inserted

<span style="background-color: initial;"></span>

Hit a brick wall there I'm afraid.

@Alex-D
Copy link
Owner

Alex-D commented Oct 2, 2017

Can't reproduce :/

@Alex-D Alex-D closed this as completed Oct 2, 2017
@scabros
Copy link

scabros commented Aug 17, 2018

it's happening to me also

chrome: Versión 69.0.3497.32 (Build oficial) beta (64 bits) in windows 7
Trumbowyg-2.10.0

the only strange setting active is, also, resetCss: true.

it produces this html:

<div class="entry-content"> mmm, raro todo esto...<br><br><p>-<span style="background-color: initial;">-</span></p><p> Roberto Scattini<br> Sistemas - DGTALPG</p> </div>

original text included a "signature" like this:
--<br />Roberto Scattini<br />Sistemas - DGTALPG

@Alex-D
Copy link
Owner

Alex-D commented Aug 20, 2018

So, I should remove this option...

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

3 participants