Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim content #2405

Open
1 task done
loveoverflowdev opened this issue Dec 3, 2024 · 3 comments
Open
1 task done

Trim content #2405

loveoverflowdev opened this issue Dec 3, 2024 · 3 comments
Labels
question Further information is requested

Comments

@loveoverflowdev
Copy link

Is there an existing issue for this?

The question

How can I strip or trim HTML content to remove
tags and whitespace at the beginning and end?

@loveoverflowdev loveoverflowdev added the question Further information is requested label Dec 3, 2024
@EchoEllet
Copy link
Collaborator

strip or trim HTML content to remove
tags and whitespace at the beginning and end?

Could you provide more context, are you trying to convert Quill Delta (the document JSON) to HTML? HTML conversation is not part of this repo.

@loveoverflowdev
Copy link
Author

Could you provide more context, are you trying to convert Quill Delta (the document JSON) to HTML? HTML conversation is not part of this repo.

Thank for your response.

When I call this method, the result is a Delta object which is not trimmed yet.

And the popular need is trimming the Delta content.

How can I do that ?

Thank you !

/// Returns contents of this document as [Delta].
  Delta toDelta() => Delta.from(_delta);

@EchoEllet
Copy link
Collaborator

I'm not sure how this relates to HTML conversation. This method outputs the Delta as it's.

Could you share the JSON output and a screenshot of the content in the editor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants