Comments (11)
It happens in both 6 and 7.
Here's a fiddle:
https://fiddle.tiny.cloud/fVQGGgyZ0B/4
It shows both issues, the conversion to black and ignoring the style tags.
** Edit: I updated the fiddle and images to be more clear to explain what I mean
from tinymce.
I doing this in the meantime, it only addresses the issue of transparent being converted to black. The issue where it ignores and doesn't force HEX colors in the style
tags, this won't address.
editor.on('BeforeSetContent', function (e) {
e.content = e.content.replace(/((color|background-color|border-color)\s*:\s*|background\s*:[^;]*?)\btransparent\b/g, '$1#00000000');
});
from tinymce.
I can confirm the issue after upgrading to v7.0.0.
Maybe because the option was removed entirely and forced now?
Is there a way of not enforcing it via the init config?
EDIT: this solved my issue as well:
editor.on('BeforeSetContent', function (e) {
e.content = e.content.replace(
/((color|background-color|border-color)\s*:\s*|background\s*:[^;]*?)\btransparent\b/g,
'$1#00000000'
);
});
from tinymce.
Which version? A replication case will help a lot. Although the option is named "force hex color", the fact that it forces the color value to hex seems to be by design.
The option was added to solve a regression between TinyMCE 5 and 6, but we couldn't revert it as that would be a breaking change. We're looking at a proper fix for TinyMCE 7, so your feedback and an example would be much appreciated.
from tinymce.
I can confirm the issue existing in v7.0.0. We are using @tinymce/tinymce-react.
@TopCoder02's approach has helped.
from tinymce.
Confirmed this as a bug and a regression so escalating internally.
from tinymce.
Also encoutered it.
To summarize for people passing by (correct me if Iโm wrong)
- The bug already exists in
6.x
(if you theforce_hex_color
option) - Moste people will encouter this bug when switching to
7.x
(since theforce_hex_color
behavior is now enforced)
Anyway, thanks guys for your reactivity,
Tiny rocks ! ๐
from tinymce.
yes we haven't implemented the change yet so 7-dev
will be the same as 6
.
from tinymce.
Confirmed fixed in the next release. #9414
This can be confirmed using the 7-dev
channel on fiddle.tiny.cloud
from tinymce.
@TheSpyder This changed doesn't address any of the issues reported here.
from tinymce.
Huh. I thought it was rolling back to the v5 implementation, but I see what you mean. Apologies.
from tinymce.
Related Issues (20)
- Copied Word document highlighted text and table does not show appropriately on iPad OS 17.4.1 HOT 1
- ๅจ้กต้ขๆปๅจๆถ ๆๅ ฅ่กจๆ ผ็ๅผนๅบๅฑไฝ็ฝฎไธๆญฃ็กฎ HOT 1
- How to stop tinymce parse checking and correcting HTML code automatically when it readed data from databas? HOT 4
- block_formats options not translated if using documented approach
- Please tell me about how to remove the p tag wrapping HOT 2
- Adding an iframe tag with tinymce7 includes sandbox HOT 2
- Usage based billing - API key usage for localhost clients
- placeholder doesn't show on h1 element when using inline editor
- id="title" stripped from element in tinymce 7 HOT 2
- Link/Unlink partial unlinking not working anymore HOT 1
- Add the domain youtube-nocookie.com to the sandbox_iframes_exclusions default value
- Copy-pasted parsed URLs are (incorrectly) URL encoding ampersands HOT 1
- isDirty isn't set when first action removes something from list.
- Dynamically initial selectbox values HOT 1
- Spacebar doesn't always work in Mozilla firefox
- The resize handle icon of status bar is displayed on the left end HOT 1
- Accordions wide gap HOT 3
- Help plugin failed to load HOT 3
- I don't want to display the unit after the font-size, is there any way to do that? HOT 1
- ๐ Padding on Tables Elements doesn't work in some cases. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinymce.