Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CKEditor 5 Custom Build
Project
Project
Details
Activity
Releases
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Daniel Kaufmann
CKEditor 5 Custom Build
Commits
966d5aff
Commit
966d5aff
authored
Oct 01, 2019
by
Marek Lewandowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs: Fixed code listing in the README.md.
parent
09f0f1b2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
README.md
README.md
+12
-11
No files found.
README.md
View file @
966d5aff
...
...
@@ -31,17 +31,18 @@ npm install --save @ckeditor/ckeditor5-build-decoupled-document
And use it in your website:
```
html
<div
id=
"toolbar-container"
></div>
<div
id=
"editor"
>
<p>
This is the editor content.
</p>
</div>
<script
src=
"./node_modules/@ckeditor/ckeditor5-build-decoupled-document/build/ckeditor.js"
></script>
<script>
DecoupledEditor
.
create
(
'<h2>Hello world!</h2>'
,
{
toolbarContainer
:
document
.
querySelector
(
'.toolbar-container'
),
editableContainer
:
document
.
querySelector
(
'.editable-container'
)
}
)
.
create
(
document
.
querySelector
(
'#editor'
)
)
.
then
(
editor
=>
{
// The toolbar needs to be explicitly appended.
document
.
querySelector
(
'#toolbar-container'
).
appendChild
(
editor
.
ui
.
view
.
toolbar
.
element
);
window
.
editor
=
editor
;
}
)
.
catch
(
err
=>
{
...
...
@@ -59,11 +60,11 @@ import DecoupledEditor from '@ckeditor/ckeditor5-build-decoupled-document';
// const DecoupledEditor = require( '@ckeditor/ckeditor5-build-decoupled-document' );
DecoupledEditor
.
create
(
'<h2>Hello world!</h2>'
,
{
toolbarContainer
:
document
.
querySelector
(
'.toolbar-container'
),
editableContainer
:
document
.
querySelector
(
'.editable-container'
)
}
)
.
create
(
document
.
querySelector
(
'#editor'
)
)
.
then
(
editor
=>
{
// The toolbar needs to be explicitly appended.
document
.
querySelector
(
'#toolbar-container'
).
appendChild
(
editor
.
ui
.
view
.
toolbar
.
element
);
window
.
editor
=
editor
;
}
)
.
catch
(
err
=>
{
...
...
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