Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Add ability to create codemirror with merge plugin, fixes #91 #117

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

CarlAmbroselli
Copy link

This let's you use the merge plugin by adding merge-view to the directive.

Example:

<ui-codemirror
    merge-view
    ui-codemirror-opts="options"
    ng-model="editCopy">
</ui-codemirror>
$scope.options = {
        orig: 'StringToCompareWith',
        lineNumbers: true,
        highlightDifferences: true,
        connect: true,
        collapseIdentical: false
}

@LeSuisse
Copy link

LeSuisse commented Dec 7, 2015

I needed to use the merge plugin so I have done some functional testing of this PR. As far as I can tell this seems to work.
I think it would be a good idea if these changes could be considered for integration.

@yannis-rossetto
Copy link

Hello,

Any news about this contribution ?

@goldserg
Copy link

I don't understand how to use merge plugin.

Both values (old and new) I receive from ajax ($resource), and on initialisation moment I have no values...
What I should do?

html

js
$scope.editorOptions = {
mode: 'xml',
lineNumbers: true,
highlightDifferences: true,
connect: true,
collapseIdentical: false
};

...GET {
$scope.leftVar = val1;
$scope.rightVar = val2;
$scope.editorOptions.origLeft = $scope.rightVar;
}

@goldserg
Copy link

I used hack. Wrap in ng-if and directive start only after ajax complete.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants