-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 22246a9
Showing
279 changed files
with
129,678 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
UEditor是由百度web前端研发部开发所见即所得富文本web编辑器 | ||
=================================== | ||
UEditor是由百度web前端研发部开发所见即所得富文本web编辑器,具有轻量,可定制,注重用户体验等特点,开源基于MIT协议,允许自由使用和修改代码。 | ||
|
||
Installation | ||
------------ | ||
|
||
The preferred way to install this extension is through [composer](http://getcomposer.org/download/). | ||
|
||
Either run | ||
|
||
``` | ||
php composer.phar require --prefer-dist wdteam/yii2-ueditor "*" | ||
``` | ||
|
||
or add | ||
|
||
``` | ||
"wdteam/yii2-ueditor": "*" | ||
``` | ||
|
||
to the require section of your `composer.json` file. | ||
|
||
|
||
Usage | ||
----- | ||
|
||
Once the extension is installed, simply use it in your code by : | ||
|
||
```php | ||
<?= \wdteam\ueditor\WdUeditor::widget(); ?>``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace wdteam\ueditor; | ||
|
||
/** | ||
* | ||
*/ | ||
class WdUeditor extends \yii\base\Widget | ||
{ | ||
public function run() | ||
{ | ||
return "Hello!"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "wdteam/yii2-ueditor", | ||
"description": "UEditor是由百度web前端研发部开发所见即所得富文本web编辑器,具有轻量,可定制,注重用户体验等特点,开源基于MIT协议,允许自由使用和修改代码。", | ||
"type": "yii2-extension", | ||
"keywords": ["yii2","extension","ueditor"], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "windsdeng", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"yiisoft/yii2": "*" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"wdteam\\ueditor\\": "" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | ||
"http://www.w3.org/TR/html4/loose.dtd"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | ||
<title></title> | ||
<style type="text/css"> | ||
*{color: #838383;margin: 0;padding: 0} | ||
html,body {font-size: 12px;overflow: hidden; } | ||
.content{padding:5px 0 0 15px;} | ||
input{width:210px;height:21px;line-height:21px;margin-left: 4px;} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="content"> | ||
<span><var id="lang_input_anchorName"></var></span><input id="anchorName" value="" /> | ||
</div> | ||
<script type="text/javascript" src="../internal.js"></script> | ||
<script type="text/javascript"> | ||
var anchorInput = $G('anchorName'), | ||
node = editor.selection.getRange().getClosedNode(); | ||
if(node && node.tagName == 'IMG' && (node = node.getAttribute('anchorname'))){ | ||
anchorInput.value = node; | ||
} | ||
anchorInput.onkeydown = function(evt){ | ||
evt = evt || window.event; | ||
if(evt.keyCode == 13){ | ||
editor.execCommand('anchor', anchorInput.value); | ||
dialog.close(); | ||
domUtils.preventDefault(evt) | ||
} | ||
}; | ||
dialog.onok = function (){ | ||
editor.execCommand('anchor', anchorInput.value); | ||
dialog.close(); | ||
}; | ||
$focus(anchorInput); | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.