Commit graph

13 commits

Author SHA1 Message Date
Taly f951ceddf6
hide toolbar and selection on typing (#289)
closes #288
2018-07-17 17:14:56 +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 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 bf83f41cc2 BlockManager 2017-11-30 10:19:07 +03:00
George Berezhnoy 5f89e54908 Fix 2017-11-25 19:03:23 +03:00
Murod Khaydarov 57af8905e9 powerful architecture 2017-11-25 11:25:00 +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
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
Peter Savchenko e71a12401a Refactoring (#144)
* codex -> codex.editor

* ESlint code style

* Code lint

* fix inline module 'this' call

* fixed toolbox leaf

* removed empty spaces

* caret module code improved
2017-02-01 20:25:59 +03:00
khaydarov c3ee7560f1 cover restoring, versioning, sanitize and new initialization structure (#105)
* cover restoring fixed

* upd

* fetch fixed in safari

* updated

* plugins

* plugins ready

* code improved

* fixed bug with backspace

* improved architecture

* Versioning (#102)

* start versioning

* codex.version

* eslint settings

* versioning improved

* cover restoring and fetch function fixed (#101)

* cover restoring fixed

* upd

* fetch fixed in safari

* updated

* plugins

* plugins ready

* code improved

* fixed bug with backspace

* improved architecture

* new sanitize method (#103)

* new sanitize method

Need to fix caret position

* removed console logs

* version updated

* eslint style

* caret position

* big fixed on sanitize method

* sanitize improved, using observers

* sanitize: using html-janitor

* fixes

* last fixes, code improved after review

* updated

* new bundle

* webpack config improved

* upd

* upd

* upd

* upd

* clear from conflicts

* upd

* upd
2017-01-10 21:22:40 +03:00