Hey everyone, just posting as I think I'
# package-development
p
Hey everyone, just posting as I think I'm loosing it atm šŸ˜… I’m migrating to Umbraco v15. Historically we used a lot of macros inside RTE tables. Each macro had a contentKey that we resolved against the Dictionary in the macro partial. In v15 I’m replacing those macros with a Block that also takes a contentKey and resolves it from the Dictionary. What I’ve built- The block’s RTE setting label uses: {umbDictionary: contentKey} I provide a UFM renderer: class DictionaryUfmApi extends UmbUfmComponentBase which outputs: The element: class UfmDictByAlias extends UmbUfmElementBase reads the block’s actual value for contentKey, calls a backoffice API, and returns the Dictionary value for the current culture. End-to-end, the API wiring works and returns the right value. The issue- In TinyMCE ā€œclassicā€, I just get: (empty). The custom element only seems to run after a full page reload. In TinyMCE ā€œinlineā€, it does resolve and render the Dictionary value—but the editor itself becomes unusable (fields aren’t editable and the floating toolbar is way off). This makes the editor experience pretty buggy. What I’ve tried- I also explored TipTap: (a) Allowing custom elements inside so I can use blocks in tables (had to configure table headers from scratch). (b) Avoiding automatic wrapping by introducing a custom block node so I don’t affect existing site styles. (c) Dealing with the trailing empty block () TipTap keeps appending at the end of every RTE field. TipTap is close but the last bit (trailing empty node) makes the output noisy unless I strip it, and thus far almost impossible to do? Any pointers (or known limitations) would be much appreciated.
s
Please make sure to head to https://foum.umbraco.com and ask your question there šŸ‘
6 Views