Commit graph

60 commits

Author SHA1 Message Date
Peter Savchenko
972eb87d89
UI: Block Settings, show Plus after Enter keydown (#265)
* Some UI improvements: icons settigns

* Show plus button after split

* decrease autoprefixer

* rename variable
2018-06-28 12:20:41 +03:00
Peter Savchenko
543d35f463
Create svg sprite (#261) 2018-06-23 20:35:06 +03:00
Peter Savchenko
dbb4cd6f8f
TypeScript support, Webpack 4, Inline Toolbar beginning (#257)
* Create UI

* Support TypeScript Modules

* remove tmp files

* migrate to 2-spaced tabs

* Add TS Linter
2018-06-11 15:29:15 +03:00
Peter Savchenko
c1afcf0205
Toolbar, Toolbox, UI (#239)
* Toolbox making

* Add Toolbox buttons click handler

* Toolbar, Toolbox, UI

* Updates

* update css prefix
2017-12-24 15:35:05 +03:00
Peter Savchenko
2df18b00b0
Module abstract (#226)
* Abstract Module class

Now all modules inherits from `Module` class. You don’t need more to
write

```js
constructor({ config }) {
        this.Editor = null;
        this.config = config;
}
```
and

```js
    /**
     * @param Editor
     * @param Editor.modules {@link CodexEditor#moduleInstances}
     * @param Editor.config {@link CodexEditor#configuration}
     */
    set state(Editor) {

        this.Editor = Editor;

    }
```

## Default exports improved

Now you don’t need more to write `.default` on module requiring

```js
let module = require(‘module’).default;
```

* Update docs
2017-12-11 13:24:46 +03:00
George Berezhnoy
566ae8dd07 Update vars naming 2017-12-04 13:02:25 +03:00
George Berezhnoy
dc9a20c62a Merge branch 'rewriting-version2.0' into renderer-initial 2017-12-04 12:09:34 +03:00
Peter Savchenko
5f670c3985
Autoloading improved, utilities now global (#225)
* Autoloading improved, utilities now global

# Autoloading

Webpack специально не дает использовать переменные в реквайрах типа:

let moduleName = 'toolbar.js';
let module = require(moduleName);

У нас в автолоадинге было так:

let modules = editorModules.map( module =>
require('./components/modules/' + module ));

и это работало, но не так как нужно. Он подключал не только нужные
модули из массива editorModules, а вообще все модули из папки
components/modules. Я заметил, что они попадают в сборку, хоть и не
указаны в реквайрах. Оказывается это так и задумано: Webpack на этапе
компиляции не знает что будет в переменной, то есть какой там будет
модуль. А ему нужно высчитать время компиляции, поэтому он вкладывет в
сброрку тупо все файлы из этой папки, и для каждого высчитывает время.
Так что по сути это было то же самое что просто написать
require('./components/modules/') и подключить все файлы.

Но наш автолоадер должен был подключать только указанные файлы, не
заходить в подпапки и не включать файлы, начинающиеся с подчеркивания.

Теперь автолоадинг работает так, как и задумывалось.

# Global visible modules

Теперь не нужно в каждом файле писать

import $ from '../dom';

и тд. Они автоматически будут доступны внутри модулей

* Update util.Dom

* Remove duplicated Babel helpers. Now it will be defined at once
2017-12-02 15:35:55 +03:00
George Berezhnoy
8b3a7c2747 Merge branch 'rewriting-version2.0' into renderer-initial 2017-11-30 20:01:47 +03:00
Peter Savchenko
d66a2f9d0c
Update to Webpack 3 (#223)
* Update to Webpack 3

* remove nom log
2017-11-26 16:31:34 +03:00
Peter Savchenko
7bf5bf72f1
Remove class 'name' getter (#222) 2017-11-25 20:05:35 +03:00
Murod Khaydarov
19320da8d1 trying new architecture 2017-11-21 00:17:18 +03:00
George Berezhnoy
e06d3c36eb Hot fix for Codex.Notes 2017-10-12 20:04:35 +03:00
George Berezhnoy
03f84307f4 Update version 2017-08-30 16:09:37 +03:00
George Berezhnoy
5e9c0a175f Merge branch 'master' into add-update 2017-08-30 14:20:13 +03:00
Taly Guryn
6a95324f0c update version 2017-08-30 06:49:10 +03:00
Taly Guryn
49827b75d7 Add custom placeholder 2017-08-30 06:33:09 +03:00
Taly Guryn
610ee0b27c Update version 2017-08-30 05:23:01 +03:00
Taly Guryn
8d628b9dc3 Update version 2017-08-30 04:19:02 +03:00
George Berezhnoy
880505a88c Remove placeholder when toolbar is opened 2017-08-30 03:40:16 +03:00
George Berezhnoy
b5fae97b3d New saver 2017-08-30 02:33:57 +03:00
Peter Savchenko
dc1d780c89 configure sanitize 2017-04-25 03:47:30 +03:00
George Berezhnoy
aecd0da45a Update version 2017-04-24 20:41:36 +03:00
George Berezhnoy
e027488fa8 Update version 2017-04-24 02:04:38 +03:00
Peter Savchenko
da4d8153d7 Improve AJAX context saving (#184)
* Improve AJAX context saving

Value returned in beforeSend method now will be passed as context to
the Error, Success and Progress events

* resolve conflict
2017-04-23 17:11:03 +03:00
Murod Khaydarov
49a4290e8e sanitize improvements 2017-04-23 00:53:06 +03:00
George Berezhnoy
510764a3cd Attaches plugin (#181)
* Attaches plugin

* Ignore server dir

* Progress bar added

* Styles upd

* Fix

* refactoring

* core.ajax fix

* Upd

* Upd

* update styles

* remove tmp return

* styles updated

* file title now 'title'

* Current upload check

* update attaches and image plugin
2017-03-21 21:45:52 +03:00
khaydarov
7972b2ff50 sanitizer configuration (#179) 2017-03-16 00:42:47 +03:00
Taly
a98d6e4f1a Release.1.6 (#178)
* Remove textarea, add holder

* Change textareaId to holderId release.1.6.0

* Update bundles release.1.6
2017-03-15 17:29:55 +03:00
khaydarov
c8808e802b content module. New description, private and public methods (#175)
* content module. New description, private and public methods

* clear from anchors and covers

* clear from example

* cleared services
2017-03-03 18:39:56 +03:00
khaydarov
83f0407ee2 callbacks module refactored and added description to each method. (#174)
* callbacks module refactored and added description to each method.

Now all methods have descriptions and documented as JSDoc style

* increase version

* refactored ui
2017-03-02 13:44:53 +03:00
Peter Savchenko
f4e1b2aff7 release.1.5.5 – Transport updated 2017-02-27 19:19:42 +03:00
George Berezhnoy
c87eddc7c3 raw plugin added (#163)
* raw plugin added

* Try to paste raw html to raw plugin

* insert text/plain to native area instead of contenteditable element

* styles updated

* rename variable

* fixed raw backspace click handler

* paste code

* Replace mask with two svg icons

* Toolbox leaf fix

* Remove data in example.html

* Toolbar and caret behavior improvments

* upd

* Upd

* new bundle due the local merge
2017-02-27 14:44:22 +03:00
khaydarov
3cbe8faaa6 Remove tool type from switchBlock -> by default it will saved from previous (#166)
* small fixes

regex match must not be similar to pasted string. Ex:
```https://www.instagram.com/p/BQ3wxmlA5GN/?taken-by=thenotoriousmma``
and match is ```https://www.instagram.com/p/BQ3wxmlA5GN/```.

```SwitchBlock``` have 3 parameter that is not important

* new instagram embed regex
2017-02-26 13:22:21 +03:00
George Berezhnoy
7f737774bb Fix (#165) 2017-02-23 13:32:41 +03:00
George Berezhnoy
9e32f5a47d hideToolbar flag added (#162) 2017-02-17 01:15:23 +03:00
George Berezhnoy
d2e755086a Destroy module (#157)
* listeners module added

* Destroy method added

* Destroy method for plugins added

* Delete plugins properties from window obj

* Revert "Delete plugins properties from window obj"

This reverts commit 6c91f81229.

* Twitter and instagram api's destroy

* Scripts destoy added

* Fix

* Replace regex with String.indexOf

* Settings for destroyer
2017-02-13 20:54:18 +03:00
George Berezhnoy
e28349d3fb Paste moved to core (#158)
* Paste moved to core

* Some fixies
2017-02-12 18:25:20 +03:00
George Berezhnoy
4b33f59031 List plugin improvements (#151)
* Fix

* Merge branch 'master' into list-hotfix

# Conflicts:
#	codex-editor.js
#	codex-editor.js.map
#	package.json
#	whatwg-fetch.js.map

* styles updted

* Ctrl+A fix

* Add comment to the new methods
2017-02-11 13:53:45 +03:00
Peter Savchenko
d8297116b8 1.4.8. - anchors module updated 2017-02-10 16:45:27 +03:00
Peter Savchenko
b20b96131e Prepare plugins improvements 2017-02-10 16:00:01 +03:00
George Berezhnoy
edcd0d793c Notifications improved (#152)
* Notifications improved

* Animation fix

* styles updated

* Fixes for prompt and confirm types
2017-02-09 01:01:13 +03:00
George Berezhnoy
f253fa121d Fix (#156) 2017-02-08 19:21:59 +03:00
George Berezhnoy
61fd151568 anchors added (#150)
* anchors added

* Styles improve and keyboard behavior fix

* Styles improve

* Translit added

* Anchors as default settings

* Remove trash changes

* Upd

* Anchors module added and version updated

* styles imroved

* remove anchor flag on mobile viewport
2017-02-08 09:39:07 +03:00
khaydarov
f5314dfab6 Prepare plugins (#148)
* prepare plugins improvements

* prepare plugins asyncronically

* update version

* restore data from cache when plugin is unavailable

* added comments to the complicated solution

* new module tools.js for methods working with plugins

* remove ArrayOfCachedData

* build updated

* remove trash
2017-02-05 17:50:48 +03:00
khaydarov
1397727115 paste module improvements (#145)
* paste module improvements

* paste callback improved

users won’t be able to paste on block without designMode
2017-02-02 16:58:05 +03:00
Peter Savchenko
70df6b20b0 New plugin preparation scheme - now async (#143)
- core.importScript now returns a Promise
- ui.preparePlugins now returns a Promise
- `prepare` method of tools now *should* return a promise
2017-02-01 12:14:00 +03:00
khaydarov
869c65f3da code improved after review 2017-01-30 20:11:58 +03:00
khaydarov
bb7aaee8e3 Merge branch 'master' into paragraph-parser-algorythm
# Conflicts:
#	codex-editor.js.map
#	whatwg-fetch.js.map
2017-01-30 19:57:52 +03:00
Peter Savchenko
13d9c04781 settings&delete icons background 2017-01-28 17:40:42 +03:00