nozer / quill-delta-to-html

Converts Quill's delta ops to HTML
MIT License
404 stars 95 forks source link

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

Open Azuf opened 3 years ago

Azuf commented 3 years ago

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`,
                  };
            }
      },
});
volser commented 3 years ago

can you provide an exmaple, please?

SikoSoft commented 2 years ago

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.