Ueditor editor and at. js integration, ueditor editor at. js
<% @ Page language = "java" import = "java. util. *" pageEncoding = "UTF-8" %>
<%
// Disable jsp parsing $ {}
%>
<% @ Page isELIgnored = "true" %>
<%
String path = request. getContextPath ();
String basePath = request. getScheme () + "://"
+ Request. getServerName () + ":" + request. getServerPort ()
+ Path + "/";
%>
<! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN">
<Html>
<Head>
<Base href = "<% = basePath %>">
<Title> at + ueditor integration </title>
<Meta http-equiv = "x-ua-compatible" content = "IE = Edge"/>
<Meta http-equiv = "pragma" content = "no-cache">
<Meta http-equiv = "cache-control" content = "no-cache">
<Meta http-equiv = "expires" content = "0">
<Meta http-equiv = "keywords" content = "keyword1, keyword2, keyword3">
<Meta http-equiv = "description" content = "This is my page">
<Link href = "<% = path %>/css/jquery.atwho.min.css" rel = "stylesheet">
<Script src = "<% = path %>/js/jquery. min. js" type = "text/javascript"> </script>
<Script type = "text/javascript" charset = "UTF-8" src = "<% = path %>/ueditor. config. js"> </script>
<Script type = "text/javascript" charset = "UTF-8" src = "<% = path %>/ueditor/_ examples/editor_api.js"> </script>
<Script src = "<% = path %>/js/jquery. caret. min. js" type = "text/javascript"> </script>
<Script src = "<% = path %>/js/jquery. atwho. min. js" type = "text/javascript"> </script>
<Style type = "text/css">
. Dkhs-edui {
Border: 1px solid # d4d4d4;
}
</Style>
<Script type = "text/javascript">
$ (Function (){
Var at_config = {
At :"@",
Data: ['Peter ', 'Tom', 'Anne ', 'zhangsan', 'lisi', 'wangwu', 'laoliu', 'libai', 'dupu ', 'xiaozhou'],
Limit: 20
}
Var ue = UE. getEditor ('mytextarea ',{
ContextMenu: [],
// The content during initialization is automatically cleared during focus.
AutoClearinitialContent: true,
// Disable word count statistics
WordCount: false,
// Close elementPath
ElementPathEnabled: false,
});
Ue. addListener ('ready', function (editor ){
$ ("# Edui1"). removeClass ("edui-editor edui-default"). addClass ("dkhs-edui ");
((This.doc ument. body). atwho (at_config );
});
});
</Script>
</Head>
<Body>
<Textarea id = "mytextarea" contenteditable = "true"> dd </textarea>
</Body>
</Html>