PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.10.0
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.10.0
2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 1.1.0 All 77 releases
fluent-community / assets / index3.js

index3.js in FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses 2.10.0, at assets/index3.js

2 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import{i as a,a as s}from"./index6.js?ver=2.10.0";import{p as u,u as d,v as p}from"./milkdown.js?ver=2.10.0";import{a5 as f,a4 as m,ar as h,aq as P}from"./vendor.js?ver=2.10.0";import"./fcom-utils.js?ver=2.10.0";import"./dayjs.js?ver=2.10.0";import"./vue.js?ver=2.10.0";function C(n){var e;return n.childCount<=1&&!((e=n.firstChild)!=null&&e.content.size)}function g(n,e){const{selection:o}=n;if(!o.empty)return null;const t=o.$anchor,r=t.parent;if(r.content.size>0||p(l=>l.type.name==="table")(t))return null;const c=t.before();return P.node(c,c+r.nodeSize,{class:"crepe-placeholder","data-placeholder":e})}const i=u({text:"Please enter...",mode:"block"},"placeholderConfigCtx"),y=d(n=>new f({key:new m("CREPE_PLACEHOLDER"),props:{decorations:e=>{const o=n.get(i.key);if(o.mode==="doc"&&!C(e.doc)||a(e.selection)||s(e.selection))return null;const t=o.text??"Please enter...",r=g(e,t);return r?h.create(e.doc,[r]):null}}})),T=(n,e)=>{n.config(o=>{e&&o.update(i.key,t=>({...t,...e}))}).use(y).use(i)};export{T as defineFeature,i as placeholderConfig,y as placeholderPlugin};
2