php-quill-renderer icon indicating copy to clipboard operation
php-quill-renderer copied to clipboard

Support for complex unknown attributes

Open deanblackborough opened this issue 7 years ago • 1 comments

Notes from v3.15.0 release detailing requirements.

  • Added support for Color delta type, it creates a span with a style="color: #xxx" definition, thank you (https://github.com/on2)

Notes

The implementation works and does not break anything, however, I will extend the feature in the future. It should really be handled in the same way unknown attributes are handled in the plain Insert delta. The Insert delta only deals with a simple key and value, it needs to be extended to allow complex values, that way an attribute like {"attributes":{"style":{"color": #e60000"}} could generate the same output and allow much more flexibility. I'm happy to leave the Color delta in until the next major version as I believe it is a feature other people may use.

deanblackborough avatar Oct 25 '18 22:10 deanblackborough

I would love this to be implemented as well! We have a lot of custom attributes, mostly objects, and for all we already have a custom render method. We only need to be able to pass a map of attribute name > render method, or something alike, to make this work. Now we are forced to do some pre- and post-process around rendering to work around this.

Btw, semi-related, it would be great if this also makes it possible to overwrite rendering of current registered attribute names. E.g. we have an image attribute which is more complex than just a string of an url. If we can use the same way of supplying a custom render method which overrules the current one that would be great. (Let me know if you want me to make a separate issue for this.)

Is there anything I can do to help get this implemented?

lode avatar Apr 05 '19 16:04 lode