updating gh-pages for commit b6d7233be3

gh-pages
Dmitri Akatov 11 years ago
parent 9d4096eafe
commit f786abac4c

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html ng-app="simple">
<head>
<title>Simple</title>
<!-- we need jquery for e2e testing -->
<script src="https://rawgithub.com/components/jquery/2.0.2/jquery.js"></script>
<script src="https://rawgithub.com/johannestroeger/bower-angular-unstable/1.1.5/angular.js"></script>
<script src="https://rawgithub.com/akatov/angular-contenteditable/master/angular-contenteditable.js"></script>
<script>
angular.module('simple', ['contenteditable'])
.controller('Ctrl', function($scope) {
// $scope.model2 = 'hello'
$scope.model = "Initial stuff <b>with bold</b> <em>and italic</em> yay"
window.scope = $scope
})
.controller('Ctrl2', function($scope) {})
angular.bootstrap(document, ['simple'])
</script>
</head>
<body>
<div ng-controller="Ctrl">
<label>Contenteditable (View):</label>
<span id="input" contenteditable="true" ng-model="model" no-line-breaks="true" style="display:block">
something
</span>
<hr>
<div>
<label>Model:</label>
<pre id="output" onclick="console.log('clicked the output')">{{ model }}</pre>
</div>
</div>
</body>
</html>

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html ng-app="simple">
<head>
<title>Simple</title>
<!-- we need jquery for e2e testing -->
<script src="https://rawgithub.com/components/jquery/2.0.2/jquery.js"></script>
<script src="https://rawgithub.com/johannestroeger/bower-angular-unstable/1.1.5/angular.js"></script>
<script src="https://rawgithub.com/akatov/angular-contenteditable/master/angular-contenteditable.js"></script>
<script>
angular.module('simple', ['contenteditable'])
.controller('Ctrl', function($scope) {
// $scope.model2 = 'hello'
$scope.model = "Initial stuff <b>with bold</b> <em>and italic</em> and <span contenteditable='false'>non-editable</span> stuff"
})
.controller('Ctrl2', function($scope) {})
angular.bootstrap(document, ['simple'])
</script>
</head>
<body>
<div ng-controller="Ctrl">
<label>Contenteditable (View):</label>
<div id="input" contenteditable="true" ng-model="model" strip-br="true" select-non-editable="true">
something
</div>
<hr>
<div>
<label>Model:</label>
<pre id="output" onclick="console.log('clicked the output')">{{ model }}</pre>
</div>
</div>
</body>
</html>

@ -0,0 +1,41 @@
<!DOCTYPE html>
<html ng-app="simple">
<head>
<title>Simple</title>
<!-- we need jquery for e2e testing -->
<script src="https://rawgithub.com/components/jquery/2.0.2/jquery.js"></script>
<script src="https://rawgithub.com/johannestroeger/bower-angular-unstable/1.1.5/angular.js"></script>
<script src="https://rawgithub.com/akatov/angular-contenteditable/master/angular-contenteditable.js"></script>
<script>
angular.module('simple', ['contenteditable'])
.controller('Ctrl', function($scope) {
$scope.model = "Initial stuff <b>with bold</b> <em>and italic</em> yay"
})
angular.bootstrap(document, ['simple'])
</script>
</head>
<body>
<div ng-controller="Ctrl">
<label>Contenteditable (View):</label>
<div id="input" contenteditable ng-model="model">
</div>
<hr>
<div>
<label>Model:</label>
<pre id="output" onclick="console.log('clicked the output')">{{ model }}</pre>
</div>
<hr>
<div contenteditable>Edit me - I don't affect anything</div>
<hr>
<div id="i1" contenteditable="true" ng-model="model"></div>
<hr>
<div id="i2" contenteditable="TRUE" ng-model="model"></div>
<hr>
<div id="i3" contenteditable="tRuE" ng-model="model"></div>
<hr>
<div id="i4" contenteditable="tRUe" ng-model="model"></div>
<hr>
<div id="i5" contenteditable="f" ng-model="model"></div>
</div>
</body>
</html>

@ -0,0 +1,3 @@
[ "Russia <img src=\"img/ru.gif\">"
, "United States of America <img src=\"img/us.gif\">"
, "United Kingdom <img src=\"img/gb.gif\">"]

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html ng-app="simple">
<head>
<title>Simple</title>
<!-- we need jquery for e2e testing -->
<script src="https://rawgithub.com/components/jquery/2.0.2/jquery.js"></script>
<script src="https://rawgithub.com/johannestroeger/bower-angular-unstable/1.1.5/angular.js"></script>
<script src="https://rawgithub.com/akatov/angular-contenteditable/master/angular-contenteditable.js"></script>
<script>
angular.module('simple', ['contenteditable'])
.controller('Ctrl', function($scope) {
// $scope.model2 = 'hello'
$scope.model = "Initial stuff <b>with bold</b> <em>and italic</em> yay"
})
.controller('Ctrl2', function($scope) {})
angular.bootstrap(document, ['simple'])
</script>
</head>
<body>
<div ng-controller="Ctrl">
<label>Contenteditable (View):</label>
<div id="input" contenteditable="true" ng-model="model" strip-br="true">
something
</div>
<hr>
<div>
<label>Model:</label>
<pre id="output" onclick="console.log('clicked the output')">{{ model }}</pre>
</div>
</div>
</body>
</html>

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en" ng-app="typeahead1">
<head>
<meta charset="utf-8">
<link href="https://rawgithub.com/jozefizso/bower-bootstrap-css/2.3.2/css/bootstrap.css" rel="stylesheet">
<script src="https://rawgithub.com/components/jquery/2.0.2/jquery.js"></script>
<script src="https://rawgithub.com/johannestroeger/bower-angular-unstable/1.1.5/angular.js"></script>
<script src="https://rawgithub.com/angular-ui/bootstrap-bower/0.4.0/ui-bootstrap.js"></script>
<script src="https://rawgithub.com/angular-ui/bootstrap-bower/0.4.0/ui-bootstrap-tpls.js"></script>
<script src="https://rawgithub.com/akatov/angular-contenteditable/master/angular-contenteditable.js"></script>
<script>
angular.module('typeahead1', ['ui.bootstrap', 'contenteditable'])
.controller('Typeahead1Ctrl', function ($scope) {
$scope.selected = undefined
$scope.states = ['<b>sweet home</b> Alabama', '<i>cold</i> Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Dakota', 'North Carolina', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming']
})
</script>
</head>
<body>
<div class='container-fluid' ng-controller="Typeahead1Ctrl">
<pre>Model: {{selected| json}}</pre>
<div ng-model="selected" typeahead="state for state in states | filter:$viewValue" contenteditable>
</div>
</div>
</body>
</html>

@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en" ng-app="typeahead2">
<head>
<meta charset="utf-8">
<link href="https://rawgithub.com/jozefizso/bower-bootstrap-css/2.3.2/css/bootstrap.css" rel="stylesheet">
<script src="https://rawgithub.com/components/jquery/2.0.2/jquery.js"></script>
<script src="https://rawgithub.com/johannestroeger/bower-angular-unstable/1.1.5/angular.js"></script>
<script src="https://rawgithub.com/angular-ui/bootstrap-bower/0.4.0/ui-bootstrap.js"></script>
<script src="https://rawgithub.com/angular-ui/bootstrap-bower/0.4.0/ui-bootstrap-tpls.js"></script>
<script src="https://rawgithub.com/akatov/angular-contenteditable/master/angular-contenteditable.js"></script>
<script>
angular.module('typeahead2', ['ui.bootstrap', 'contenteditable'])
.controller('Typeahead2Ctrl', function ($scope) {
$scope.selected = undefined
$scope.states =
[ 'Russia <img src="img/ru.gif">'
, 'USA <img src="img/us.gif">'
, 'UK <img src="img/gb.gif">'
]
})
.filter('ignoreImg', function(){
var escapeRegexp = function(str) {
return str.replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1")
}
var noImg = function (str) {
return str.replace(/<img[^>]*>/g, '')
}
return function(items, query) {
var ret = []
items.forEach(function(item){
if (noImg(item).match(new RegExp(escapeRegexp(noImg(query)), 'gi')))
ret.push(item)
})
return ret
}
})
// override typeahead's Highlight filter - don't highlight anything
.filter('typeaheadHighlight', function() {
return function(matchItem, query){return matchItem}
})
</script>
</head>
<body>
<div class='container-fluid' ng-controller="Typeahead2Ctrl">
<pre>Model: {{ selected | json }}</pre>
<div ng-model="selected" typeahead="state for state in states | ignoreImg:$viewValue" contenteditable>
</div>
</div>
</body>
</html>

@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en" ng-app="typeahead3">
<head>
<meta charset="utf-8">
<link href="https://rawgithub.com/jozefizso/bower-bootstrap-css/2.3.2/css/bootstrap.css" rel="stylesheet">
<script src="https://rawgithub.com/components/jquery/2.0.2/jquery.js"></script>
<script src="https://rawgithub.com/johannestroeger/bower-angular-unstable/1.1.5/angular.js"></script>
<script src="https://rawgithub.com/angular-ui/bootstrap-bower/0.4.0/ui-bootstrap.js"></script>
<script src="https://rawgithub.com/angular-ui/bootstrap-bower/0.4.0/ui-bootstrap-tpls.js"></script>
<script src="https://rawgithub.com/akatov/angular-contenteditable/master/angular-contenteditable.js"></script>
<script>
angular.module('typeahead3', ['ui.bootstrap', 'contenteditable'])
.controller('Typeahead3Ctrl', function($scope, $http, limitToFilter, ignoreImgFilter) {
$scope.selected = ""
$scope.states = function(query){
return $http.get("states.json").then(function(response){
console.log("response", response)
return limitToFilter(ignoreImgFilter(response.data, query), 2)
})
}
})
.filter('ignoreImg', function(){
var escapeRegexp = function(str) {
return str.replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1")
}
var noImg = function (str) {
return str.replace(/<img[^>]*>/g, '')
}
return function(items, query) {
var ret = []
items.forEach(function(item){
if (noImg(item).match(new RegExp(escapeRegexp(noImg(query)), 'gi')))
ret.push(item)
})
return ret
}
})
// override typeahead's Highlight filter - don't highlight anything
.filter('typeaheadHighlight', function() {
return function(matchItem, query){return matchItem}
})
</script>
</head>
<body>
<div class='container-fluid' ng-controller="Typeahead3Ctrl">
<pre>Model: {{ selected | json }}</pre>
<div ng-model="selected" typeahead="state for state in states($viewValue)" contenteditable="true" style="width:400px; height: 20px;"></div>
</div>
</body>
</html>

@ -3,6 +3,16 @@
<title>angular-contenteditable</title>
</head>
<body>
<h1>angular-contenteditable</h1>
<h1>angular contenteditable</h1>
<h2>examples<h2>
<ul>
<li><a href='examples/no-line-breaks.html'>no-line-breaks.html</a></li>
<li><a href='examples/select-non-editable.html'>select-non-editable.html</a></li>
<li><a href='examples/simple.html'>simple.html</a></li>
<li><a href='examples/strip-br.html'>strip-br.html</a></li>
<li><a href='examples/typeahead1.html'>typeahead1.html</a></li>
<li><a href='examples/typeahead2.html'>typeahead2.html</a></li>
<li><a href='examples/typeahead3.html'>typeahead3.html</a></li>
</ul>
</body>
</html>