src/js/wysiwygCommands/italic.js
function styleItalic(sq) {
  if (sq.hasFormat('i') || sq.hasFormat('em')) {
    sq.changeFormat(null, {tag: 'i'});
  } else if (!sq.hasFormat('a') && !sq.hasFormat('PRE')) {
    if (sq.hasFormat('code')) {
      sq.changeFormat(null, {tag: 'code'});
    }
    sq.italic();
  }
}
function styleItalic(sq) {
  if (sq.hasFormat('i') || sq.hasFormat('em')) {
    sq.changeFormat(null, {tag: 'i'});
  } else if (!sq.hasFormat('a') && !sq.hasFormat('PRE')) {
    if (sq.hasFormat('code')) {
      sq.changeFormat(null, {tag: 'code'});
    }
    sq.italic();
  }
}
function styleItalic ( sq ) { if ( sq . hasFormat ( 'i' ) || sq . hasFormat ( 'em' ) ) { sq . changeFormat ( null , { tag : 'i' } ) ; } else if ( ! sq . hasFormat ( 'a' ) && ! sq . hasFormat ( 'PRE' ) ) { if ( sq . hasFormat ( 'code' ) ) { sq . changeFormat ( null , { tag : 'code' } ) ; } sq . italic ( ) ; } }
Style italic.
@param {object} sq - squire editor instance
Style italic .