@@ -241,7 +241,7 @@ export function addNodeAndExtensionsToSpec<
241241 // - has distinctive HTML with data-suggestion="true" for round-trip parsing
242242 // - has NO custom nodeView (uses vanilla renderHTML only)
243243 const suggestionNode = Node . create ( {
244- name : `suggestion- ${ blockConfig . type } ` ,
244+ name : `${ blockConfig . type } --attributed ` ,
245245 content : ( blockConfig . content === "inline"
246246 ? "inline*"
247247 : blockConfig . content === "none"
@@ -255,30 +255,22 @@ export function addNodeAndExtensionsToSpec<
255255 priority,
256256 addAttributes ( ) {
257257 const attrs = propsToAttributes ( blockConfig . propSchema ) ;
258- const stripped : Record < string , any > = { } ;
259- for ( const [ key , value ] of Object . entries ( attrs ) ) {
260- stripped [ key ] = {
261- ...value ,
262- // Parse prop values from data attributes on the bn-block-content div
263- parseHTML : ( element : HTMLElement ) => {
264- return element . getAttribute ( camelToDataKebab ( key ) ) ;
265- } ,
266- } ;
267- }
268258 // The __suggestionData attribute serves two purposes:
269259 // 1. isRequired: true prevents ProseMirror's DOMParser from auto-creating
270260 // suggestion nodes to satisfy optional content expressions
271261 // 2. Rendered as data-suggestion="true" on the wrapper div for HTML parsing
272- stripped [ "__suggestionData "] = {
262+ attrs [ "yjs-suggestion-node "] = {
273263 isRequired : true ,
274264 parseHTML : ( element : HTMLElement ) => {
275265 return element . getAttribute ( "data-suggestion" ) ;
276266 } ,
277267 renderHTML : ( attributes : Record < string , any > ) => {
278- return { "data-suggestion" : attributes . __suggestionData || "true" } ;
268+ return {
269+ "data-suggestion" : attributes [ "yjs-suggestion-node" ] || "true" ,
270+ } ;
279271 } ,
280272 } ;
281- return stripped ;
273+ return attrs ;
282274 } ,
283275 parseHTML ( ) {
284276 // Only parse HTML elements that have both data-suggestion and
0 commit comments