Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
local-tinymce
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
athos
local-tinymce
Commits
a36b6e86
Commit
a36b6e86
authored
Mar 03, 2017
by
Георгий Попов
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finish set up editor
parent
c907273c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
1 deletion
+61
-1
editor.css
css/editor.css
+6
-0
index.html
index.html
+5
-1
editor.js
js/editor.js
+50
-0
No files found.
css/editor.css
0 → 100644
View file @
a36b6e86
/* TinyMCE offline editor styles */
.mce-tinymce
{
}
index.html
View file @
a36b6e86
...
...
@@ -3,10 +3,14 @@
<head>
<meta
charset=
"utf-8"
>
<title>
Локальный редактор TinyMCE
</title>
<link
rel=
"stylesheet"
href=
"/css/editor.css"
media=
"screen"
title=
"no title"
>
</head>
<body>
<textarea
id=
"editor"
>
<h1>
Новый документ TinyMCE
</h1>
</textarea>
<script
src=
"node_modules/tinymce/tinymce.min.js"
rel=
"text/javascript"
></script>
<script
src=
"js/editor.js"
rel=
"text/javascript"
></script>
</body>
</html>
js/editor.js
0 → 100644
View file @
a36b6e86
/* Scripts for tinymce setup */
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
// Textarea id for tinymce
const
editorSelector
=
'#editor'
;
tinymce
.
init
({
selector
:
editorSelector
,
theme
:
'modern'
,
height
:
"600px"
,
//plugins: 'image link preview print lists charmap fullscreen',
plugins
:
[
'advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker'
,
'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking'
,
'save table contextmenu directionality emoticons template paste textcolor'
],
toolbar
:
'fullscreen | insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons'
,
//toolbar: [
//'undo redo | styleselect | bold italic | link image | alignleft aligncenter alignright'
//],
file_browser_callback
:
function
(
field_name
,
url
,
type
,
win
)
{
var
cmsURL
=
window
.
location
.
toString
();
// script URL - use an absolute path!
if
(
cmsURL
.
indexOf
(
"?"
)
<
0
)
{
//add the type as the only query parameter
cmsURL
=
cmsURL
+
"?type="
+
type
;
}
else
{
//add the type as an additional query parameter
// (PHP session ID is now included if there is one at all)
cmsURL
=
cmsURL
+
"&type="
+
type
;
}
tinyMCE
.
activeEditor
.
windowManager
.
open
({
},
setup
:
function
(
editor
)
{
editor
.
on
(
'init'
,
function
(
e
)
{
//editor.execCommand('mceFullScreen'); // Make fullscreen by default
});
}
});
});
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