Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
officejs
Commits
e8b75933
Commit
e8b75933
authored
May 22, 2014
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add aloha editor gadget.
parent
ffb9eb4a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
0 deletions
+57
-0
Gruntfile.js
Gruntfile.js
+14
-0
src/editor_aloha/aloha.js
src/editor_aloha/aloha.js
+18
-0
src/editor_aloha/index.html
src/editor_aloha/index.html
+25
-0
No files found.
Gruntfile.js
View file @
e8b75933
...
...
@@ -193,6 +193,16 @@ module.exports = function (grunt) {
relative_dest
:
'
lib/dygraphdata.js
'
,
dest
:
'
<%= global_config.dest %>/<%= curl.dygraphdata.relative_dest %>
'
},
aloha
:
{
src
:
'
http://aloha-editor.org/builds/stable/alohaeditor-0.25.7.zip
'
,
relative_url
:
"
lib/ace-builds-3bfda31096cf3f42b77aac64eb788584ea796822/src-min/ace.js
"
,
directory
:
"
alohaeditor-0.25.7/aloha
"
,
css_relative_dest
:
"
lib/<%= curl.aloha.directory %>/css/aloha.css
"
,
require_relative_dest
:
"
lib/<%= curl.aloha.directory %>/lib/require.js
"
,
jquery_relative_dest
:
"
lib/<%= curl.aloha.directory %>/lib/vendor/jquery-1.7.2.js
"
,
js_relative_dest
:
"
lib/<%= curl.aloha.directory %>/lib/aloha.js
"
,
dest
:
'
<%= global_config.tmp %>/alohaeditor.zip
'
},
ace
:
{
src
:
'
https://github.com/ajaxorg/ace-builds/archive/3bfda31096cf3f42b77aac64eb788584ea796822.zip
'
,
relative_url
:
"
lib/ace-builds-3bfda31096cf3f42b77aac64eb788584ea796822/src-min/ace.js
"
,
...
...
@@ -248,6 +258,10 @@ module.exports = function (grunt) {
},
unzip
:
{
aloha
:
{
src
:
'
<%= curl.aloha.dest %>
'
,
dest
:
'
<%= global_config.dest %>/lib/
'
},
ace
:
{
src
:
'
<%= curl.ace.dest %>
'
,
dest
:
'
<%= global_config.dest %>/lib/
'
...
...
src/editor_aloha/aloha.js
0 → 100644
View file @
e8b75933
/*global Aloha, rJS, jQuery */
(
function
(
window
,
rJS
,
Aloha
,
$
)
{
"
use strict
"
;
rJS
(
window
)
.
declareMethod
(
'
setContent
'
,
function
(
value
)
{
$
(
'
#editor
'
).
empty
().
append
(
value
);
})
.
declareMethod
(
'
getContent
'
,
function
()
{
return
$
(
'
#editor
'
).
html
();
})
.
ready
(
function
(
g
)
{
Aloha
.
ready
(
function
()
{
Aloha
.
jQuery
(
'
#editor
'
).
aloha
();
});
});
}(
window
,
rJS
,
Aloha
,
jQuery
));
src/editor_aloha/index.html
0 → 100644
View file @
e8b75933
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
Aloha Editor
</title>
<!-- Load Aloha Editor css and js -->
<link
rel=
"stylesheet"
href=
"../<%= curl.aloha.css_relative_dest %>"
type=
"text/css"
/>
<!-- exports require() and define() into the global namespace -->
<script
src=
"../<%= curl.aloha.require_relative_dest %>"
type=
"text/javascript"
></script>
<!-- defines the 'jquery' module -->
<script
src=
"../<%= curl.aloha.jquery_relative_dest %>"
type=
"text/javascript"
></script>
<!-- uses the 'jquery' module defined above -->
<script
src=
"../<%= curl.aloha.js_relative_dest %>"
data-aloha-plugins=
"common/ui,common/format,common/highlighteditables,common/link,common/image,common/list,common/table"
></script>
<script
src=
"../<%= copy.rsvp.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= copy.renderjs.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"aloha.js"
></script>
</head>
<body>
<div
id=
"editor"
></div>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment