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)
@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
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.
Issue #1585
Hiding text editor
Your method "hideToolbar " does not provide for a situation where the text editor is greater than 100px. As a result, its piece is visible...
Issue #1113
[QUESTIONS] New trait type is not working with rendered components?
Hello, thanks for the great framework. I'm trying to apply this to my project. I want to add a new trait for existing LINK '<a>' component....
Issue #1562
Question: styles management
I waonder if it would be possible n styles managemenet to get any way to change more than one property with an ony control Example: center...
Issue #472
Modal
Hi @artf I am trying to save my template in database on click of save I wanted to show a success message in toast. Can you please help me w...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.