Giter Club home page Giter Club logo

Comments (3)

thomaspark avatar thomaspark commented on May 21, 2024

That would be the expected behavior. If there's custom css code overriding the widgets, the widgets no longer take effect. But deleting the custom css code should make them active again.

from snowball.

brianlee389 avatar brianlee389 commented on May 21, 2024

Okay. For this would it make sense to have separate event handlers for each of the code sections because if the javascript is edited would that mean the admin block wouldn't work as well. Also I have created the read only sections of the code and html should be ignored, correct?

from snowball.

thomaspark avatar thomaspark commented on May 21, 2024

That's right, HTML should be ignored. Same with the read-only sections of CSS and JS.

Adding custom CSS or JS shouldn't affect the admin block directly. Instead, custom CSS should be appended to the block's style scoped element (creating the style scoped if it doesn't exist yet). So the custom CSS works in addition to the widget styles, and can override them as well. Similarly, the custom JS would be appended to the script tag (again creating it if it doesn't exist).

I don't know if it makes sense to have different event handlers, but it would to get the CSS part working first. There will be some tricky aspects of previewing custom JS that we may or may not want to take on (i.e., infinite loops, resetting to original state, etc.) CSS will be simpler.

from snowball.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.