Skip to content

Commit 92dca61

Browse files
imperavihtml5cat
authored andcommitted
Version 8.0.3
Fixed: remove not allowed tags when you switch from the source code into a visual mode. Fixed: inserting link without http://. Fixed: IE8 image resize. Fixed: old Safari paste but without clean up :( Fixed: inserting image, table, link outside focus of the editor. Fixed: IE insertion by Fabio Poloni. Fixed: API inserHTML focus. Fixed: API setFocus. New option: paragraphy - inserting break line (br tag) on return or enter. New option: shortcuts - disable keydown / keyup shortcuts functionality. New option: autosaveCallback. New option: tabindex. New option: minHeight. New option: fixedTop. New option: fixedBox. New option: cleanup.
1 parent 7919084 commit 92dca61

29 files changed

+4455
-0
lines changed

css/style.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
html, body {
2+
margin: 0;
3+
padding: 0;
4+
}
5+
6+
7+
/* =Typography
8+
-----------------------------------------------------------------------------*/
9+
body {
10+
font-family: Helvetica, Arial, sans-serif;
11+
font-size: 14px;
12+
}
13+
14+
15+
/* =Layout
16+
-----------------------------------------------------------------------------*/
17+
#page {
18+
width: 940px;
19+
margin: 50px auto;
20+
}
21+
22+
/* =Misc
23+
-----------------------------------------------------------------------------*/
24+
.list li {
25+
margin: 10px 0;
26+
}

demo/all_uploads.html

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>All uploads</title>
5+
6+
<meta charset="utf-8">
7+
8+
<link rel="stylesheet" type="text/css" href="../css/style.css" />
9+
10+
<script type="text/javascript" src="../lib/jquery-1.7.min.js"></script>
11+
12+
<!-- Redactor is here -->
13+
<link rel="stylesheet" href="../redactor/redactor.css" />
14+
<script src="../redactor/redactor.js"></script>
15+
16+
<script type="text/javascript">
17+
$(document).ready(
18+
function()
19+
{
20+
$('#redactor_content').redactor({
21+
imageUpload: '../demo/scripts/image_upload.php',
22+
fileUpload: '../demo/scripts/file_upload.php',
23+
imageGetJson: '../demo/json/data.json'
24+
});
25+
}
26+
);
27+
</script>
28+
29+
</head>
30+
<body>
31+
<div id="page">
32+
<textarea id="redactor_content" name="content">
33+
<h2>Hello and Welcome</h2>
34+
<p>I never did quite grasp him, though he endeavored to explain it to me upon numerous occasions. I suggested telepathy, but he said no, that it was not telepathy since they could only communicate when in each others' presence, nor could they talk with the Sagoths or the other inhabitants of Pellucidar by the same method they used to converse with one another.</p>
35+
<p>"What they do," said Perry, "is to project their thoughts into the fourth dimension, when they become appreciable to the sixth sense of their listener. Do I make myself quite clear?"</p>
36+
<p>"You do not, Perry," I replied. He shook his head in despair, and returned to his work. They had set us to carrying a great accumulation of Maharan literature from one apartment to another, and there arranging it upon shelves. I suggested to Perry that we were in the public library of Phutra, but later, as he commenced to discover the key to their written language, he assured me that we were handling the ancient archives of the race.</p>
37+
<p>During this period my thoughts were continually upon Dian the Beautiful. I was, of course, glad that she had escaped the Mahars, and the fate that had been suggested by the Sagoth who had threatened to purchase her upon our arrival at Phutra. I often wondered if the little party of fugitives had been overtaken by the guards who had returned to search for them. Sometimes I was not so sure but that I should have been more contented to know that Dian was here in Phutra, than to think of her at the mercy of Hooja the Sly One. Ghak, Perry, and I often talked together of possible escape, but the Sarian was so steeped in his lifelong belief that no one could escape from the Mahars except by a miracle, that he was not much aid to us—his attitude was of one who waits for the miracle to come to him.</p>
38+
</textarea>
39+
</div>
40+
</body>
41+
</html>

demo/autosave.html

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Autosave</title>
5+
6+
<meta charset="utf-8">
7+
8+
<link rel="stylesheet" type="text/css" href="../css/style.css" />
9+
10+
<script type="text/javascript" src="../lib/jquery-1.7.min.js"></script>
11+
12+
<!-- Redactor is here -->
13+
<link rel="stylesheet" href="../redactor/redactor.css" />
14+
<script src="../redactor/redactor.js"></script>
15+
16+
<script type="text/javascript">
17+
$(document).ready(
18+
function()
19+
{
20+
$('#redactor_content').redactor({
21+
autosave: 'scripts/save.php',
22+
interval: 30,
23+
autosaveCallback: testCallback
24+
});
25+
}
26+
);
27+
28+
function testCallback(data, redactor_obj)
29+
{
30+
alert(data);
31+
}
32+
33+
</script>
34+
35+
</head>
36+
<body>
37+
<div id="page">
38+
39+
<textarea id="redactor_content" name="content">
40+
<h2>Hello and Welcome</h2>
41+
<p>I never did quite grasp him, though he endeavored to explain it to me upon numerous occasions. I suggested telepathy, but he said no, that it was not telepathy since they could only communicate when in each others' presence, nor could they talk with the Sagoths or the other inhabitants of Pellucidar by the same method they used to converse with one another.</p>
42+
<p>"What they do," said Perry, "is to project their thoughts into the fourth dimension, when they become appreciable to the sixth sense of their listener. Do I make myself quite clear?"</p>
43+
<p>"You do not, Perry," I replied. He shook his head in despair, and returned to his work. They had set us to carrying a great accumulation of Maharan literature from one apartment to another, and there arranging it upon shelves. I suggested to Perry that we were in the public library of Phutra, but later, as he commenced to discover the key to their written language, he assured me that we were handling the ancient archives of the race.</p>
44+
<p>During this period my thoughts were continually upon Dian the Beautiful. I was, of course, glad that she had escaped the Mahars, and the fate that had been suggested by the Sagoth who had threatened to purchase her upon our arrival at Phutra. I often wondered if the little party of fugitives had been overtaken by the guards who had returned to search for them. Sometimes I was not so sure but that I should have been more contented to know that Dian was here in Phutra, than to think of her at the mercy of Hooja the Sly One. Ghak, Perry, and I often talked together of possible escape, but the Sarian was so steeped in his lifelong belief that no one could escape from the Mahars except by a miracle, that he was not much aid to us—his attitude was of one who waits for the miracle to come to him.</p>
45+
</textarea>
46+
</div>
47+
</body>
48+
</html>

demo/files_upload.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Files upload</title>
5+
6+
<meta charset="utf-8">
7+
8+
<link rel="stylesheet" type="text/css" href="../css/style.css" />
9+
10+
<script type="text/javascript" src="../lib/jquery-1.7.min.js"></script>
11+
12+
<!-- Redactor is here -->
13+
<link rel="stylesheet" href="../redactor/redactor.css" />
14+
<script src="../redactor/redactor.js"></script>
15+
16+
<script type="text/javascript">
17+
$(document).ready(
18+
function()
19+
{
20+
$('#redactor_content').redactor({
21+
fileUpload: '../demo/scripts/file_upload.php'
22+
});
23+
}
24+
);
25+
</script>
26+
27+
</head>
28+
<body>
29+
<div id="page">
30+
<textarea id="redactor_content" name="content">
31+
<h2>Hello and Welcome</h2>
32+
<p>I never did quite grasp him, though he endeavored to explain it to me upon numerous occasions. I suggested telepathy, but he said no, that it was not telepathy since they could only communicate when in each others' presence, nor could they talk with the Sagoths or the other inhabitants of Pellucidar by the same method they used to converse with one another.</p>
33+
<p>"What they do," said Perry, "is to project their thoughts into the fourth dimension, when they become appreciable to the sixth sense of their listener. Do I make myself quite clear?"</p>
34+
<p>"You do not, Perry," I replied. He shook his head in despair, and returned to his work. They had set us to carrying a great accumulation of Maharan literature from one apartment to another, and there arranging it upon shelves. I suggested to Perry that we were in the public library of Phutra, but later, as he commenced to discover the key to their written language, he assured me that we were handling the ancient archives of the race.</p>
35+
<p>During this period my thoughts were continually upon Dian the Beautiful. I was, of course, glad that she had escaped the Mahars, and the fate that had been suggested by the Sagoth who had threatened to purchase her upon our arrival at Phutra. I often wondered if the little party of fugitives had been overtaken by the guards who had returned to search for them. Sometimes I was not so sure but that I should have been more contented to know that Dian was here in Phutra, than to think of her at the mercy of Hooja the Sly One. Ghak, Perry, and I often talked together of possible escape, but the Sarian was so steeped in his lifelong belief that no one could escape from the Mahars except by a miracle, that he was not much aid to us—his attitude was of one who waits for the miracle to come to him.</p>
36+
</textarea>
37+
</div>
38+
</body>
39+
</html>

demo/fixed.html

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Fixed toolbar</title>
5+
6+
<meta charset="utf-8">
7+
8+
<link rel="stylesheet" type="text/css" href="../css/style.css" />
9+
10+
<script type="text/javascript" src="../lib/jquery-1.7.min.js"></script>
11+
12+
<!-- Redactor is here -->
13+
<link rel="stylesheet" href="../redactor/redactor.css" />
14+
<script src="../redactor/redactor.js"></script>
15+
16+
<script type="text/javascript">
17+
$(document).ready(
18+
function()
19+
{
20+
$('#redactor_content').redactor({
21+
fixed: true
22+
});
23+
}
24+
);
25+
</script>
26+
27+
</head>
28+
<body>
29+
<div id="page">
30+
<textarea id="redactor_content" name="content">
31+
<h2>Please, scroll down</h2>
32+
<p>I never did quite grasp him, though he endeavored to explain it to me upon numerous occasions. I suggested telepathy, but he said no, that it was not telepathy since they could only communicate when in each others' presence, nor could they talk with the Sagoths or the other inhabitants of Pellucidar by the same method they used to converse with one another.</p>
33+
<p>"What they do," said Perry, "is to project their thoughts into the fourth dimension, when they become appreciable to the sixth sense of their listener. Do I make myself quite clear?"</p>
34+
<p>"You do not, Perry," I replied. He shook his head in despair, and returned to his work. They had set us to carrying a great accumulation of Maharan literature from one apartment to another, and there arranging it upon shelves. I suggested to Perry that we were in the public library of Phutra, but later, as he commenced to discover the key to their written language, he assured me that we were handling the ancient archives of the race.</p>
35+
<p>During this period my thoughts were continually upon Dian the Beautiful. I was, of course, glad that she had escaped the Mahars, and the fate that had been suggested by the Sagoth who had threatened to purchase her upon our arrival at Phutra. I often wondered if the little party of fugitives had been overtaken by the guards who had returned to search for them. Sometimes I was not so sure but that I should have been more contented to know that Dian was here in Phutra, than to think of her at the mercy of Hooja the Sly One. Ghak, Perry, and I often talked together of possible escape, but the Sarian was so steeped in his lifelong belief that no one could escape from the Mahars except by a miracle, that he was not much aid to us—his attitude was of one who waits for the miracle to come to him.</p>
36+
<p>I never did quite grasp him, though he endeavored to explain it to me upon numerous occasions. I suggested telepathy, but he said no, that it was not telepathy since they could only communicate when in each others' presence, nor could they talk with the Sagoths or the other inhabitants of Pellucidar by the same method they used to converse with one another.</p>
37+
<p>"What they do," said Perry, "is to project their thoughts into the fourth dimension, when they become appreciable to the sixth sense of their listener. Do I make myself quite clear?"</p>
38+
<p>"You do not, Perry," I replied. He shook his head in despair, and returned to his work. They had set us to carrying a great accumulation of Maharan literature from one apartment to another, and there arranging it upon shelves. I suggested to Perry that we were in the public library of Phutra, but later, as he commenced to discover the key to their written language, he assured me that we were handling the ancient archives of the race.</p>
39+
<p>During this period my thoughts were continually upon Dian the Beautiful. I was, of course, glad that she had escaped the Mahars, and the fate that had been suggested by the Sagoth who had threatened to purchase her upon our arrival at Phutra. I often wondered if the little party of fugitives had been overtaken by the guards who had returned to search for them. Sometimes I was not so sure but that I should have been more contented to know that Dian was here in Phutra, than to think of her at the mercy of Hooja the Sly One. Ghak, Perry, and I often talked together of possible escape, but the Sarian was so steeped in his lifelong belief that no one could escape from the Mahars except by a miracle, that he was not much aid to us—his attitude was of one who waits for the miracle to come to him.</p>
40+
41+
</textarea>
42+
43+
<br><br><br><br><br>
44+
<br><br><br><br><br>
45+
<br><br><br><br><br>
46+
<br><br><br><br><br>
47+
<br><br><br><br><br>
48+
<br><br><br><br><br>
49+
<p>It's true! Toolbar is fixed.</p>
50+
<br><br><br><br><br>
51+
</div>
52+
</body>
53+
</html>

demo/images_json.html

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>JSON</title>
5+
6+
<meta charset="utf-8">
7+
8+
<link rel="stylesheet" type="text/css" href="../css/style.css" />
9+
10+
<script type="text/javascript" src="../lib/jquery-1.7.min.js"></script>
11+
12+
13+
<!-- Redactor is here -->
14+
<link rel="stylesheet" href="../redactor/redactor.css" />
15+
<script src="../redactor/redactor.js"></script>
16+
17+
<script type="text/javascript">
18+
$(document).ready(
19+
function()
20+
{
21+
$('#redactor_content').redactor({
22+
imageGetJson: '../demo/json/data.json'
23+
});
24+
}
25+
);
26+
</script>
27+
28+
</head>
29+
<body>
30+
<div id="page">
31+
<textarea id="redactor_content" name="content">
32+
<h2>Hello and Welcome</h2>
33+
<p>I never did quite grasp him, though he endeavored to explain it to me upon numerous occasions. I suggested telepathy, but he said no, that it was not telepathy since they could only communicate when in each others' presence, nor could they talk with the Sagoths or the other inhabitants of Pellucidar by the same method they used to converse with one another.</p>
34+
<p>"What they do," said Perry, "is to project their thoughts into the fourth dimension, when they become appreciable to the sixth sense of their listener. Do I make myself quite clear?"</p>
35+
<p>"You do not, Perry," I replied. He shook his head in despair, and returned to his work. They had set us to carrying a great accumulation of Maharan literature from one apartment to another, and there arranging it upon shelves. I suggested to Perry that we were in the public library of Phutra, but later, as he commenced to discover the key to their written language, he assured me that we were handling the ancient archives of the race.</p>
36+
<p>During this period my thoughts were continually upon Dian the Beautiful. I was, of course, glad that she had escaped the Mahars, and the fate that had been suggested by the Sagoth who had threatened to purchase her upon our arrival at Phutra. I often wondered if the little party of fugitives had been overtaken by the guards who had returned to search for them. Sometimes I was not so sure but that I should have been more contented to know that Dian was here in Phutra, than to think of her at the mercy of Hooja the Sly One. Ghak, Perry, and I often talked together of possible escape, but the Sarian was so steeped in his lifelong belief that no one could escape from the Mahars except by a miracle, that he was not much aid to us—his attitude was of one who waits for the miracle to come to him.</p>
37+
</textarea>
38+
</div>
39+
</body>
40+
</html>

demo/images_upload.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Images upload</title>
5+
6+
<meta charset="utf-8">
7+
8+
<link rel="stylesheet" type="text/css" href="../css/style.css" />
9+
10+
<script type="text/javascript" src="../lib/jquery-1.7.min.js"></script>
11+
12+
<!-- Redactor is here -->
13+
<link rel="stylesheet" href="../redactor/redactor.css" />
14+
<script src="../redactor/redactor.js"></script>
15+
16+
<script type="text/javascript">
17+
$(document).ready(
18+
function()
19+
{
20+
$('#redactor_content').redactor({
21+
imageUpload: '../demo/scripts/image_upload.php'
22+
});
23+
}
24+
);
25+
</script>
26+
27+
</head>
28+
<body>
29+
<div id="page">
30+
<textarea id="redactor_content" name="content">
31+
<h2>Hello and Welcome</h2>
32+
<p>I never did quite grasp him, though he endeavored to explain it to me upon numerous occasions. I suggested telepathy, but he said no, that it was not telepathy since they could only communicate when in each others' presence, nor could they talk with the Sagoths or the other inhabitants of Pellucidar by the same method they used to converse with one another.</p>
33+
<p>"What they do," said Perry, "is to project their thoughts into the fourth dimension, when they become appreciable to the sixth sense of their listener. Do I make myself quite clear?"</p>
34+
<p>"You do not, Perry," I replied. He shook his head in despair, and returned to his work. They had set us to carrying a great accumulation of Maharan literature from one apartment to another, and there arranging it upon shelves. I suggested to Perry that we were in the public library of Phutra, but later, as he commenced to discover the key to their written language, he assured me that we were handling the ancient archives of the race.</p>
35+
<p>During this period my thoughts were continually upon Dian the Beautiful. I was, of course, glad that she had escaped the Mahars, and the fate that had been suggested by the Sagoth who had threatened to purchase her upon our arrival at Phutra. I often wondered if the little party of fugitives had been overtaken by the guards who had returned to search for them. Sometimes I was not so sure but that I should have been more contented to know that Dian was here in Phutra, than to think of her at the mercy of Hooja the Sly One. Ghak, Perry, and I often talked together of possible escape, but the Sarian was so steeped in his lifelong belief that no one could escape from the Mahars except by a miracle, that he was not much aid to us—his attitude was of one who waits for the miracle to come to him.</p>
36+
</textarea>
37+
</div>
38+
</body>
39+
</html>

demo/img/button1.png

153 Bytes
Loading

demo/json/data.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[
2+
{ "thumb": "json/images/1_m.jpg", "image": "json/images/1.jpg", "title": "Image 1", "folder": "Folder 1" },
3+
{ "thumb": "json/images/2_m.jpg", "image": "json/images/2.jpg", "title": "Image 2", "folder": "Folder 1" },
4+
{ "thumb": "json/images/3_m.jpg", "image": "json/images/3.jpg", "title": "Image 3", "folder": "Folder 1" },
5+
{ "thumb": "json/images/4_m.jpg", "image": "json/images/4.jpg", "title": "Image 4", "folder": "Folder 1" },
6+
{ "thumb": "json/images/5_m.jpg", "image": "json/images/5.jpg", "title": "Image 5", "folder": "Folder 1" },
7+
{ "thumb": "json/images/1_m.jpg", "image": "json/images/1.jpg", "title": "Image 6", "folder": "Folder 1" },
8+
{ "thumb": "json/images/2_m.jpg", "image": "json/images/2.jpg", "title": "Image 7", "folder": "Folder 1" },
9+
{ "thumb": "json/images/3_m.jpg", "image": "json/images/3.jpg", "title": "Image 8", "folder": "Folder 1" },
10+
{ "thumb": "json/images/4_m.jpg", "image": "json/images/4.jpg", "title": "Image 9", "folder": "Folder 1" },
11+
{ "thumb": "json/images/5_m.jpg", "image": "json/images/5.jpg", "title": "Image 10", "folder": "Folder 2" },
12+
{ "thumb": "json/images/1_m.jpg", "image": "json/images/1.jpg", "title": "Image 11", "folder": "Folder 2" },
13+
{ "thumb": "json/images/2_m.jpg", "image": "json/images/2.jpg", "title": "Image 12", "folder": "Folder 2" }
14+
]

demo/json/images/1.jpg

120 KB
Loading

0 commit comments

Comments
 (0)