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

WYSIWYG editor color #186

Open
julienlegac opened this issue Mar 30, 2017 · 1 comment
Open

WYSIWYG editor color #186

julienlegac opened this issue Mar 30, 2017 · 1 comment
Labels

Comments

@julienlegac
Copy link

If you change color, the black color (100%), If you click nothing happens.

@wonknu
Copy link
Contributor

wonknu commented Jun 9, 2017

  • how to reproduce the issue

1) Setup abe type rich

{{abe type='rich' key='key' desc='description' toolbar='*' tab='default'}}

2) Wrap it inside a div that have a color style, for exemple

<style> div{ color: blue; } </style>
<div> {{abe type='rich' key='key' desc='description' toolbar='*' tab='default'}} </div>

result :
capture d ecran 2017-06-09 a 10 47 52

If you click on the dark color on the bottom - right the text won't become black.

The reason is that the text editor (wysiwygjs) execute this javascript commande to set the color

document.execCommand("foreColor", !1, "#000000");

What happen is that the text editor already have this black color by default, so the browser detect that the default color is already black and instead of changing it color to black it reset it style to the default color (which seems logical). But it cause that the text preview on the right also get it style undo so it color is back to it default color.

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

No branches or pull requests

3 participants