/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
import{Node as r,mergeAttributes as e}from"../../core/dist/index.js";var t="&nbsp;",n=r.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:r}){return["p",e(this.options.HTMLAttributes,r),0]},parseMarkdown:(r,e)=>{const n=r.tokens||[];if(1===n.length&&"image"===n[0].type)return e.parseChildren([n[0]]);const a=e.parseInline(n);return 1!==a.length||"text"!==a[0].type||a[0].text!==t&&" "!==a[0].text?e.createNode("paragraph",void 0,a):e.createNode("paragraph",void 0,[])},renderMarkdown:(r,e)=>{if(!r)return"";const n=Array.isArray(r.content)?r.content:[];return 0===n.length?t:e.renderChildren(n)},addCommands(){return{setParagraph:()=>({commands:r})=>r.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});export{n as Paragraph};