@textbus/platform-browser 3.0.0-alpha.32 → 3.0.0-alpha.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/index.esm.js +5 -5
- package/bundles/index.js +4 -4
- package/package.json +3 -3
package/bundles/index.esm.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import 'reflect-metadata';
|
2
2
|
import { InjectionToken, Injectable, Inject, Injector, Optional } from '@tanbo/di';
|
3
|
-
import { VTextNode, VElement, Controller, Selection, RootComponentRef, Renderer, Scheduler, Slot, ContentType, Keyboard, Commander, History, makeError, Starter, NativeRenderer, NativeSelectionBridge, OutputRenderer,
|
3
|
+
import { VTextNode, VElement, Controller, Selection, RootComponentRef, Renderer, Scheduler, Slot, ContentType, Keyboard, Commander, History, makeError, Starter, NativeRenderer, NativeSelectionBridge, OutputRenderer, Registry, invokeListener } from '@textbus/core';
|
4
4
|
import { Subject, filter, fromEvent, Subscription, merge, map, Observable, distinctUntilChanged } from '@tanbo/stream';
|
5
5
|
|
6
6
|
function createElement(tagName, options = {}) {
|
@@ -2336,7 +2336,7 @@ class Viewer extends Starter {
|
|
2336
2336
|
return this;
|
2337
2337
|
}
|
2338
2338
|
const parser = this.get(Parser);
|
2339
|
-
const
|
2339
|
+
const registry = this.get(Registry);
|
2340
2340
|
const doc = this.get(VIEW_DOCUMENT);
|
2341
2341
|
const keyboard = this.get(Keyboard);
|
2342
2342
|
keyboard.addShortcut({
|
@@ -2355,7 +2355,7 @@ class Viewer extends Starter {
|
|
2355
2355
|
component = parser.parseDoc(content, this.rootComponentLoader);
|
2356
2356
|
}
|
2357
2357
|
else {
|
2358
|
-
component =
|
2358
|
+
component = registry.createComponentByFactory(content, this.rootComponent);
|
2359
2359
|
}
|
2360
2360
|
}
|
2361
2361
|
else {
|
@@ -2472,7 +2472,7 @@ class Viewer extends Starter {
|
|
2472
2472
|
replaceContent(content) {
|
2473
2473
|
this.guardReady();
|
2474
2474
|
const parser = this.get(Parser);
|
2475
|
-
const
|
2475
|
+
const registry = this.get(Registry);
|
2476
2476
|
const rootComponentRef = this.get(RootComponentRef);
|
2477
2477
|
const selection = this.get(Selection);
|
2478
2478
|
const rootComponentLoader = this.rootComponentLoader;
|
@@ -2481,7 +2481,7 @@ class Viewer extends Starter {
|
|
2481
2481
|
component = parser.parseDoc(content, rootComponentLoader);
|
2482
2482
|
}
|
2483
2483
|
else {
|
2484
|
-
component =
|
2484
|
+
component = registry.createComponentByFactory(content, this.rootComponent);
|
2485
2485
|
}
|
2486
2486
|
selection.unSelect();
|
2487
2487
|
rootComponentRef.component.slots.clean();
|
package/bundles/index.js
CHANGED
@@ -2338,7 +2338,7 @@ class Viewer extends core.Starter {
|
|
2338
2338
|
return this;
|
2339
2339
|
}
|
2340
2340
|
const parser = this.get(exports.Parser);
|
2341
|
-
const
|
2341
|
+
const registry = this.get(core.Registry);
|
2342
2342
|
const doc = this.get(VIEW_DOCUMENT);
|
2343
2343
|
const keyboard = this.get(core.Keyboard);
|
2344
2344
|
keyboard.addShortcut({
|
@@ -2357,7 +2357,7 @@ class Viewer extends core.Starter {
|
|
2357
2357
|
component = parser.parseDoc(content, this.rootComponentLoader);
|
2358
2358
|
}
|
2359
2359
|
else {
|
2360
|
-
component =
|
2360
|
+
component = registry.createComponentByFactory(content, this.rootComponent);
|
2361
2361
|
}
|
2362
2362
|
}
|
2363
2363
|
else {
|
@@ -2474,7 +2474,7 @@ class Viewer extends core.Starter {
|
|
2474
2474
|
replaceContent(content) {
|
2475
2475
|
this.guardReady();
|
2476
2476
|
const parser = this.get(exports.Parser);
|
2477
|
-
const
|
2477
|
+
const registry = this.get(core.Registry);
|
2478
2478
|
const rootComponentRef = this.get(core.RootComponentRef);
|
2479
2479
|
const selection = this.get(core.Selection);
|
2480
2480
|
const rootComponentLoader = this.rootComponentLoader;
|
@@ -2483,7 +2483,7 @@ class Viewer extends core.Starter {
|
|
2483
2483
|
component = parser.parseDoc(content, rootComponentLoader);
|
2484
2484
|
}
|
2485
2485
|
else {
|
2486
|
-
component =
|
2486
|
+
component = registry.createComponentByFactory(content, this.rootComponent);
|
2487
2487
|
}
|
2488
2488
|
selection.unSelect();
|
2489
2489
|
rootComponentRef.component.slots.clean();
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@textbus/platform-browser",
|
3
|
-
"version": "3.0.0-alpha.
|
3
|
+
"version": "3.0.0-alpha.33",
|
4
4
|
"description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",
|
5
5
|
"main": "./bundles/index.js",
|
6
6
|
"module": "./bundles/index.esm.js",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"dependencies": {
|
28
28
|
"@tanbo/di": "^1.1.4",
|
29
29
|
"@tanbo/stream": "^1.1.8",
|
30
|
-
"@textbus/core": "^3.0.0-alpha.
|
30
|
+
"@textbus/core": "^3.0.0-alpha.33",
|
31
31
|
"reflect-metadata": "^0.1.13"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
@@ -48,5 +48,5 @@
|
|
48
48
|
"bugs": {
|
49
49
|
"url": "https://github.com/textbus/textbus.git/issues"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "7888d3b0a0977343c4f8483bb5792cb24a32939a"
|
52
52
|
}
|