Invalid indentation in Jade

283 Views Asked by At

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');
1

There are 1 best solutions below

0
On

You have an syntax error here. Replace

    script
     CKEDITOR.replace('body');

by

    script.
     CKEDITOR.replace('body');