source/fonts.js
// Event handler for the font size list

Event handler for the font size list
Event handler for the font size list
function onSizeListClick(e) {
    if (e.target && e.target.nodeName === 'LI') {
      const li = e.target
      const value = li.textContent
      if (value) {
        const size = fontDisplayToSize(value)
        config.fontSize = size
        setPreviewFontSize()
        sendFontSizeChange()
        selectElement(li)
      }
    }
  }
function onSizeListClick ( e ) { if ( e . target && e . target . nodeName === 'LI' ) { const li = e . target const value = li . textContent if ( value ) { const size = fontDisplayToSize ( value ) config . fontSize = size setPreviewFontSize ( ) sendFontSizeChange ( ) selectElement ( li ) } } }
Event handler for the font size list
Event handler for the font size list
// The target element should be an <li> element
 // The <li> element's value is the font size, e.g. "10 pt"
 // Change "10 pt" to "10pt"
 // Update font family value, send to Main Process, mark as selected
