There is a very bad bug / behaviour when trying to add a css background with an inline stylesheet.
as
<div style="color:#fff;background-image: url("image/catalog/barback.png");"></div>
If you add this div in code view when you save or return to edit view it completely destroys any other image tags etc
I am guessing the brackets with quotes is causing the issue however I could find no workaround whatsoever
It is very bizarre what the code editor does to the file.
It turns it into this
<div style="background-color:#666;color:#fff;background-image: url(" img="" catalog="" barback.png";="">
It is seriously messed up I do not understand how or why this should happen in code editing.
You're using double-quotes within double-quotes, which is why it's probably breaking. You'd need to either leave the internal set of quotes out, or use single-quotes. For example:
Code: Select all
<div style="color:#fff; background-image: url('image/catalog/barback.png');"></div>
As I said I could not find a workaround I tried every combination of single quotes, double quotes and no quotes
If you try it you will see - It saves in every case but completely destroys the code. Why does the editor interfere at all when using code edit.
You cannot save from code edit so you switch back to save and thats when it breaks.
When using single quotes which was my first guess it doesn't break the code the same but the image will not display - on any browser
The image is just not there - The only workaround I used was to create an image div and position text on top. But this breaks when viewing on ipad
All you have to do to reproduce is make html module place on page. Now edit and add this
<div style="height:60px;background-color:#666;color:#fff;font-size:24px;background-image url("image/catalog/barback.jpg");">
Then try any combination of anything you want to get the image to display - It won't and or the code will break especially if there is more code and an image tag following on
If you try it you will see - It saves in every case but completely destroys the code. Why does the editor interfere at all when using code edit.
You cannot save from code edit so you switch back to save and thats when it breaks.
When using single quotes which was my first guess it doesn't break the code the same but the image will not display - on any browser
The image is just not there - The only workaround I used was to create an image div and position text on top. But this breaks when viewing on ipad
All you have to do to reproduce is make html module place on page. Now edit and add this
<div style="height:60px;background-color:#666;color:#fff;font-size:24px;background-image url("image/catalog/barback.jpg");">
Then try any combination of anything you want to get the image to display - It won't and or the code will break especially if there is more code and an image tag following on
Single quotes or no quotes worked for me. The image was displayed as expected. There is another bug in Summernote, in that it won't save in code view, which doesn't help. viewtopic.php?f=202&t=217795#p787062
It's looks like Summernote is being replaced with CKEditor in future versions. You might also find some replacement editors in the marketplace.
It's looks like Summernote is being replaced with CKEditor in future versions. You might also find some replacement editors in the marketplace.
I just correct the summernote "we know best" nonsense by adding
just before adding or updating the product description into the database.
Code: Select all
$value['description'] = html_entity_decode($value['description']);
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Who is online
Users browsing this forum: canvasbay and 319 guests