Skip to content

Commit

Permalink
Created the build
Browse files Browse the repository at this point in the history
  • Loading branch information
simba77 committed Jun 1, 2021
0 parents commit cbd128c
Show file tree
Hide file tree
Showing 9 changed files with 18,646 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea
node_modules/
build/
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# `CKEditor5 JohnCMS build`

## Installation

First clone the repository and install dependencies from npm:

```bash
npm install
```

Run the build command:

```bash
npm run build
```

in the /build directory, you can find the compiled files.

You can find a usage example in the file index.html

### Other commands:

webpack is watching the files and compile them when they are changed.

```bash
npm run watch
```

```bash
npm run dev
```
44 changes: 44 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CKEditor 5 Framework – Quick start</title>
<link rel="stylesheet" type="text/css" href="https://johncms.com/themes/default/assets/css/app.css">
</head>
<body>
<div class="page_layout pt-4">
<form action="">
<textarea id="editor" class="form-control">
<p>Editor content goes here.</p>
</textarea>
<button class="btn btn-primary mt-3" id="submit">Submit</button>
</form>
</div>

<script src="build/ckeditor.js"></script>
<script src="build/translations/ru.js"></script>

<script>
var config = {
simpleUpload: {
// The URL that the images are uploaded to.
uploadUrl: '/',

// Enable the XMLHttpRequest.withCredentials property.
withCredentials: false,
savedCallback: function (file) {
},
},
language: 'ru'
};
ClassicEditor
.create(document.querySelector('#editor'), config)
.then(editor => {
//CKEditorInspector.attach(editor);
})
.catch(error => {
console.error(error.stack);
});
</script>
</body>
</html>
Loading

0 comments on commit cbd128c

Please sign in to comment.