Search code examples
jquerywysiwygsummernote

lineHeight option for Summernote airmode


I'm trying to add option for setting different line heights in Summernote within airmode but it doesn't seem like that option is available in airmode. Is there another way to add it as an option for the user?

This is what I've tried so far:

    tabDisable: false,
    lineHeights: ['0.5', '1.0'],
    popover: {
      air: [
        ['font', ['bold', 'clear']],
        ['fontsize', ['fontsize']],
      ]
    },
    airMode: true,

and also

    tabDisable: false,
    popover: {
      air: [
        ['font', ['bold', 'clear']],
        ['fontsize', ['fontsize']],
        ['lineHeights', ['0.5', '1']],
      ]
    },
    airMode: true,

Solution

  • You need declare the tag "height" and use lasted summernote.js (0.8.18).

    tabDisable: false,
        lineHeights: ['0.5', '1.0'],
        popover: {
          air: [
            ['font', ['bold', 'clear']],
            ['fontsize', ['fontsize']],
            ['height', ['height']],
          ]
        },
        airMode: true,