0

I'm getting below error while trying to insert a script file in Jade

Can anyone please help?

 form(method='post', action='/posts/add', enctype="mutilpart/form-data")
    .form-group
        label Title:
        input.form-control(name='title', type='text')
   .form-group
        label Category:
        select.form-control(name='category')
            each category, i in categories
                option(value='#{category.title}') #{category.title}
    .form-group
        label Body:
        textarea.form-control(name='body', id='body')
    .form-group
        label Main Image:
        input.form-control(name='mainimage', type='file')
    .form-group
        label Author:
        select.form-control(anme='author')
            option(value='Brad Traversy') Brad Traversy
            option(value='John Doe') John Doe
    input.btn.btn-defalut(name='submit',type='submit',value='Save')
    script(src='/ckeditor/ckeditor.js')
    script
        | CKEDITOR.replace('body');
Onur A.
  • 3,007
  • 3
  • 22
  • 37
Mohan
  • 1
  • Please find the error below .. > 30| script(src='/ckeditor/ckeditor.js') 31| script 32| | CKEDITOR.replace('body'); 33| Invalid indentation, you can use tabs or spaces but not both Error: C:\Users\Mohan Kala\Desktop\NodeProjects\nodeblog\views\addpost.jade:30 28| option(value='John Doe') John Doe 29| input.btn.btn-defalut(name='submit',type='submit',value='Save') > 30| script(src='/ckeditor/ckeditor.js') 31| script 32| | CKEDITOR.replace('body'); 33| Invalid indentation, you can use tabs or spaces but not both – Mohan Feb 10 '17 at 07:32
  • please edit your question and add the error. – rjdkolb Feb 10 '17 at 07:34
  • improved title and question – Onur A. Feb 11 '17 at 21:17

1 Answers1

0

You have an syntax error here. Replace

    script
     CKEDITOR.replace('body');

by

    script.
     CKEDITOR.replace('body');
tuan.tran
  • 1,781
  • 15
  • 21