2

The setup -
(It's a terrible setup, but if you're interested, I'll leave an explanation for it at the bottom.)

I am editing a .php file that is including the contents of a .jsp file. All of this is being done with Brackets and I love having the live preview window.

The problem -

Whenever I edit content in the .jsp file, the live preview window changes to the text of the .jsp (no styling as Brackets obviously can't support rendering .jsp, and that's ok.)

What I need -

Is there a way to keep the live preview window locked to the .php file? I would like Brackets to treat the .jsp file like it would treat a .css file, for example. So when I switch to the .jsp that the .php would stay in the live preview window and update it when I save. (Currently this updating works fine, it's just the constant switching back and forth that is getting irritating.)

Another solution would be to open both files in separate live preview windows, I don't know if that is possible though.



The explanation - My company is useless at updating the technology behind their website so I have to find workarounds to edit it. I am trying to create an easier editing setup for the .jsp files, which the site uses for nearly everything!

The .php file I have created is just a basic loader. By packaging the .jsp in a .php which can work with the live preview, it makes it easier and quicker to edit the files.

<head>
    <title>Demo Page</title>
    <link href="style.css" rel="stylesheet" type="text/css" media="all" /> 
</head>
<body>
    <?php include_once( "contents.jsp"); ?>
</body>
robdonn
  • 250
  • 3
  • 11
  • Did you find out how? – Ken Vernaillen Nov 25 '14 at 19:10
  • Unfortunately not. I currently just use the split screen feature to have both files open together in Brackets and makes it easier to switch between the two to see my changes. Not ideal, but it works. – robdonn Jan 21 '15 at 11:19
  • I would also love to figure this out. It must be possible to build an extension that does this, so I will look into that. – Public Trust Jan 13 '17 at 19:41

1 Answers1

0

For those looking looking for an answer to this in 2020. Extension 'Locked Live Preview' seems to be the way forward.

github homepage https://github.com/sietseb/bib.lockLivePreview

So far working flawlessly in brackets 1.14.1 with my php projects.

Soulwake
  • 45
  • 7