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

Output formatted HTML code #8668

Open
umi-soft opened this issue Dec 15, 2020 · 7 comments
Open

Output formatted HTML code #8668

umi-soft opened this issue Dec 15, 2020 · 7 comments
Labels
domain:dx This issue reports a developer experience problem or possible improvement. squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@umi-soft
Copy link

thanks for CkEditor, grate product.

getData() always return minimized html value。such as:

<div><div>a</div><div>b</div></div>

but how can i get unminimized code,such as:

<div>
   <div>
      a
   </div>
   <div>
      b
   </div>
</div>
@umi-soft umi-soft added the type:feature This issue reports a feature request (an idea for a new functionality or a missing option). label Dec 15, 2020
@mlewand mlewand changed the title output unminimized code Output formatted HTML code Dec 21, 2020
@mlewand
Copy link
Contributor

mlewand commented Dec 21, 2020

Note that you can use any HTML formatting library like js-beautify.

@mlewand mlewand added this to the backlog milestone Dec 21, 2020
@mlewand mlewand added domain:dx This issue reports a developer experience problem or possible improvement. squad:dx labels Dec 21, 2020
@umi-soft
Copy link
Author

thanks

@Mgsy
Copy link
Member

Mgsy commented Dec 23, 2020

I will leave this feature request as open, as someone might be interested in seeing an official solution in CKEditor 5.

@Mgsy Mgsy reopened this Dec 23, 2020
@lost-carrier
Copy link

+1

Some kind of pretty printed output would be great... I store the data in in backend in Git Database... would be handy to have the diffs making some sense...

@Reinmar Reinmar added squad:core Issue to be handled by the Core team. and removed squad:dx labels Sep 9, 2021
@pomek pomek removed this from the backlog milestone Feb 21, 2022
@CKEditorBot
Copy link
Collaborator

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

@quicksketch
Copy link

I'd love this feature too. Based on CKEditor 5's "Source" plugin, it appears as though CKEditor 5 already has a way to pretty-print source code, so I would not expect a 3rd party library to be necessary to achieve clean output.

@quicksketch
Copy link

I found a related issue with the way HTML is exported and filed an issue at #15293. But it's possible that fixing that issue might also help here, if CKEditor were to provide a better HTML exporter than the current BasicHtmlWriter.

@martynawierzbicka martynawierzbicka added the support:2 An issue reported by a commercially licensed client. label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:dx This issue reports a developer experience problem or possible improvement. squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

No branches or pull requests

9 participants