public void saveDocumentAs(){
       view.selectHtmlTab();
       JFileChooser jFileChooser = new JFileChooser();
       jFileChooser.setFileFilter(new HTMLFileFilter());
       int index = jFileChooser.showDialog(view, "Save File");
       if(index == JFileChooser.APPROVE_OPTION){
           currentFile = jFileChooser.getSelectedFile();
           try(FileOutputStream fileOutputStream = new FileOutputStream(currentFile)) {
               fileOutputStream.write(getDocument().getText(0, getDocument().getLength()).getBytes());



           } catch (FileNotFoundException e) {
               ExceptionHandler.log(e);
           } catch (IOException e) {
               ExceptionHandler.log(e);
           } catch (BadLocationException e) {
               ExceptionHandler.log(e);
           }
       }

   }