nozer/quill-delta-to-html

Default Quill formats lost when implementing the customTagAttributes and other custom handlers

Opened this issue · 2 comments

Azuf commented

When implementing any of the custom functions in the config, such as the customTagAttributes and returning classes as below, it replaces the default classes added by quill. How can I change this so it appends the custom class to the Quill classes instead?

let converter = new QuillDeltaToHtmlConverter(data, {
	  customTagAttributes: (op) => {
		    if (op.attributes.customAttribute) {
			      return {
			        	class: "customClassForTheCustomAttribute`,
			      };
	      	}
	  },
});

can you provide an exmaple, please?

Did you ever get this working? I became curious about this wanting to implement my own srcset attribute for images but don't see this callback actually running at any point.