ui-ace icon indicating copy to clipboard operation
ui-ace copied to clipboard

Check if the text is a json and prettify it

Open slopjong opened this issue 10 years ago • 5 comments

slopjong avatar Apr 22 '14 18:04 slopjong

If something is wrong or bad with the pull request, let me know so that I can improve it. One thing that could you keep from merging is that it's hard-coded instead of making it optional.

slopjong avatar Apr 24 '14 13:04 slopjong

I just don't know if it's really necessary in UI.Ace . I think that specific json treatment might be useful in specific project. Is it a fix? Is it blocking something ? For me UI.Ace must be just a minimal ace integration into the Angular environment.

douglasduteil avatar Apr 30 '14 10:04 douglasduteil

In my case the json got always minified on model changes even with ace's json mode enabled. After having a closer look at ace's API and googling for this I read in a google group discussion that this is the way how it should be done.

I'll check the discussion again today/tomorrow and maybe ask some ace guys if I'm yet not 100% sure. If they confirm we should add an option to auto-prettify a json. I did it hard-coded which I'm going to change to an opt-in thingie so that users have their full freedom.

slopjong avatar Apr 30 '14 12:04 slopjong

@slopjong can't you give me the links you checked ? I'm, me too, curious about it

douglasduteil avatar Apr 30 '14 12:04 douglasduteil

Now as I think of it, I'm currently not totally sure if my issue is caused by something else. I'll do some more testing.

Are you somewhere on irc? I'd like fiddle with jasmine and add some test cases for this kind of "issue", if it is one at all.

slopjong avatar Apr 30 '14 12:04 slopjong