9 Replies Latest reply: Dec 30, 2012 2:38 PM by bunnyslippers RSS

    Is Quick Edit Enabled

    heathrowe CommunityMVP

      Is Quick Edit Enabled as per todays Create the Web demonstration?

       

      I cannot seem to get this option as per the short cut or the right click context menu - nothing happens.

       

      Darrell

        • 1. Re: Is Quick Edit Enabled
          Jason San Jose Adobe Employee

          Quick Edit is enabled for CSS (tag name, class name and ID selectors) and JavaScript. What are you trying?

           

          Jason San Jose

          Computer Scientist - Brackets

          • 2. Re: Is Quick Edit Enabled
            Phil van Allen Community Member

            Quick Edit seems a bit touchy. But I find it works if you open a folder of the whole project rather than an individual file - i.e. so all the related files are open in the editor. Then click in the element and use command-e (on the mac). Also, for JavaScript, it does not seem to work if the code is in the context of HTML, for example:

             

            <button onClick="createAnalogIn();">AnalogIn</button>

             

            In this case, it does not find the createAnalogIn() function. But if the JavaScript is in a .js file, it works well.

            • 3. Re: Is Quick Edit Enabled
              Jason San Jose Adobe Employee

              Yes, Quick Edit uses the context of your project folder.

               

              Also, JavaScript Quick Edit only works inside *.js files and <scripts> blocks. It doesn't work using inline JavaScript in HTML attributes yet.

              • 4. Re: Is Quick Edit Enabled
                Hatstrosity123 Community Member

                I also seem to be having issues initializing the Quick Edit function. I have both the index.html and the main.css files open, yet when I try to press Ctrl+E or Right Click -> Quick Edit, nothing happens at all. I've tried doing this shortcut in both the files, with variations of having the Live Preview on/off, etc. and it doesn't seem to be doing Quick Edit no matter what I do. What am I missing here?

                • 5. Re: Is Quick Edit Enabled
                  Peter Flynn (Adobe) Adobe Employee

                  Where are you placing the cursor when you invoke Quick Open?  Currently, in HTML the cursor has to be on a tag name (in the open tag, not the close tag), or anywhere in the class="..." attribute.

                   

                  - Peter

                  • 6. Re: Is Quick Edit Enabled
                    Hatstrosity123 Community Member

                    Op, that did it, thanks

                    • 7. Re: Is Quick Edit Enabled
                      bunnyslippers Community Member

                      May I amend this? Your cursor must be within a tag for which there is a CSS rule. If you have your cursor in a <p> tag, and there is no rule that selects the <p> tag, the editor will not open.

                       

                      In my opinion, this feature should operate in any tag since the user's intention in invoking the QuickEditor obviously is to edit or create a CSS rule,. If there are existing rules, it would open to the first of these in the CSS file. If there are no rules, it should open to a blank line where you can create a new rule.

                      • 8. Re: Is Quick Edit Enabled
                        Peter Flynn (Adobe) Adobe Employee

                        @bunnyslippers: that's definitely a good point.  We have a user story in the Brackets backlog for this feature.  Please upvote it in Trello if you have a sec -- click the "More..." link on the user story card and choose Vote.

                         

                        One tricky aspect of this feature is what to do when there are multiple CSS files in your project.  Should we pop up a file browser, or just make an initial guess as to where the rule should go?  Which behavior would you prefer?

                         

                        - Peter

                        • 9. Re: Is Quick Edit Enabled
                          bunnyslippers Community Member
                          One tricky aspect of this feature is what to do when there are multiple CSS files in your project.  Should we pop up a file browser, or just make an initial guess as to where the rule should go?  Which behavior would you prefer?

                          Peter, thanks for asking. if there are currently no rules selecting the CSS element I'm in, I'd prefer a file browser of all my linked css files, with the option to create a new one.

                           

                          If there are existing rules, I would want the QuickEditor to open all of the relevant rules, in the order that they cascade. It would also be extremely handy for the overridden rules to display in strikeout, just as they do in my browser's (Chrome, in my case) code inspector.

                           

                          Also, I want to be able to invoke the QuickEditor from anywhere within the tag contents without having to move my cursor to the tag itself. This would be much more efficient. If I'm within the contents of nested tags, it should open the css for the innermost tag.