You can do something like this:
toDOM: () => [
'ruby',
{ lang: 'jojo' },
['span', 0],
['rt', { rtlang: 'ji' }, '1'],
]
But as you can tell, Prosemirror follows the rule : Content hole must be the only child of its parent node
, for which you will have to wrap the 0
in a span
or something more appropriate.