Issue #741Opened January 10, 2018by duskhacker0 reactions

Saving CSS removes some styles on each save

Question

This issue is a follow up of #609, I figured opening a new issue would be better than to keep commenting on a closed issue.

@artf asked if I could provide a working example of the issue. I've set up this pen:

https://codepen.io/duskhacker/pen/MrVpMa

It seems to work best in Chrome.

To see the issue, first click the 'edit CSS' button, then without editing, simply click the 'Save' button on the modal. Then click the 'edit CSS' button again, you should see that the style that was there is now gone.

This mirrors my experience in my implementation, each time I edit/save the CSS another block of styling is missing, it seems to remove the top block each time.

Answers (2)

artfJanuary 31, 20180 reactions

@duskhacker here editor.setStyle(codeViewer.editor.getValue().trim()); you're setting this string <style>.txt-red....</style> when it should be .txt-red... Quick fix, just replace setStyle with addComponents

lock[bot]September 18, 20190 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.