0

I have started to use JSON editor library and angular wrapper from angular-tools/ng-jsoneditor.

The bug appears to be very annoying when switched to code view. Anyone had something similar?

Situation image

Situation image 2

Happens only when quotes appear on that line. Thats pretty every line for a JSON.

Using standart lib, nothing changed. I'm running out of ideas.

controller

$scope.obj = { data: null, options: { mode: 'code' } };

$scope.onLoad = function (instance) {
    instance.expandAll();
};

view

<!DOCTYPE html>
<html ng-app="jsonapp" ng-controller="jsonController">
<head>
    <meta charset="utf-8" />
    <!-- when using the mode "code", it's important to specify charset utf-8 -->
    <meta content="charset=utf-8">

    <link href="jsoneditor/dist/jsoneditor.min.css" rel="stylesheet" type="text/css">
    <script src="jsoneditor/dist/jsoneditor.min.js"></script>
</head>
<body>
    <div ng-jsoneditor="onLoad" ng-model="obj.data" options="obj.options" style="height:800px"></div>
</body>
</html>
BuFF
  • 9
  • 4
  • Provide the code you have written. Text won't be helpful to understand the problem. Show us what have you tried so far. – Anand G Sep 28 '16 at 06:46
  • I've updated the code. Did anyone had similar experience? With anything. I'm seeing this for the first time. – BuFF Sep 28 '16 at 06:58

1 Answers1

0

I had a similar problem, after a few hours of investigation finally I find that what causing it was the font-family style(I had global font for all app). So I override it with ng-deep:: to font-family: monospace. This was a solution in my case!

Misha Beskin
  • 315
  • 4
  • 9