Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit a7835b7

Browse files
merge: WYSIWYG inline editor
2 parents b8279c4 + c5dad4c commit a7835b7

File tree

20 files changed

+1254
-77
lines changed

20 files changed

+1254
-77
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
<a name="1.0.0-beta.30"></a>
2+
# [1.0.0-beta.30](https://github.com/deckgo/deckdeckgo/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2019-03-07)
3+
4+
### Web Components
5+
6+
* inline editor: v1.0.0-alpha.3 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/master/webcomponents/inline-editor/CHANGELOG.md))
7+
8+
### Others
9+
10+
* docs: v1.0.0-alpha.4 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/master/docs/CHANGELOG.md))
11+
112
<a name="1.0.0-beta.29"></a>
213
# [1.0.0-beta.29](https://github.com/deckgo/deckdeckgo/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2019-03-03)
314

docs/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
<a name="1.0.0-alpha.4"></a>
2+
# 1.0.0-alpha.4 (2019-03-07)
3+
4+
### Features
5+
6+
* add new component `WYSIWYG inline editor`
7+
18
<a name="1.0.0-alpha.3"></a>
29
# [1.0.0-alpha.3](https://github.com/deckgo/deckdeckgo-docs/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2019-02-17)
310

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# WYSIWYG inline editor
2+
3+
The "WYSIWYG inline editor" component is an extra component which will be use in the upcoming [DeckDeckGo] Studio.
4+
5+
## Table of contents
6+
7+
- [Showcase](#app-components-qrcode-showcase)
8+
- [Getting started](#app-components-qrcode-getting-started)
9+
- [Using from a CDN](#app-components-from-a-cdn)
10+
- [Install from NPM](#app-components-from-npm)
11+
- [Framework integration](#app-components-qrcode-framework-integration)
12+
- [Usage](#app-components-qrcode-usage)
13+
- [Properties](#app-components-qrcode-properties)
14+
- [Styling](#app-components-qrcode-styling)
15+
- [Examples](#app-components-qrcode-examples)
16+
17+
## Showcase
18+
19+
<div>
20+
<h1 style={{color: '#3880ff'}}>DeckDeckGo (editable title)</h1>
21+
22+
<h2 style={{color: '#3880ff'}}>The Progressive Web App alternative for simple presentations 🚀 (editable subtitle)</h2>
23+
24+
<p style={{color: '#3880ff'}}>Edit anywhere, display everywhere (editable paragraph)</p>
25+
</div>
26+
27+
<deckgo-inline-editor sticky-desktop="true" sticky-mobile="true"></deckgo-inline-editor>
28+
29+
## Getting started
30+
31+
This Web Component is an inline WYSIWYG HTML Editor, It creates a floating editor bar or a sticky footer bar that shows up when you select a piece of text of your page.
32+
33+
To add the component to your web applications, it could be use directly in your project from a CDN, using a simple script include, or could be installed from [npm](https://www.npmjs.com/package/deckdeckgo-qrcode).
34+
35+
### Using from a CDN
36+
37+
It's recommended to use [unpkg](https://unpkg.com/) to use the [DeckDeckGo] inline editor from a CDN. To do so, add the following include script in the main HTML file of your project:
38+
39+
```
40+
<script src="https://unpkg.com/deckdeckgo-inline-editor@latest/dist/deckdeckgo-inline-editor.js"></script>
41+
```
42+
### Install from NPM
43+
44+
Install it in your project from [npm](https://www.npmjs.com/package/deckdeckgo-qrcode) using the following command:
45+
46+
```bash
47+
npm install deckdeckgo-inline-editor
48+
```
49+
50+
### Framework integration
51+
52+
The [Stencil documentation](https://stenciljs.com/docs/overview) provide examples of framework integration for [Angular](https://stenciljs.com/docs/angular), [React](https://stenciljs.com/docs/react), [Vue](https://stenciljs.com/docs/vue) and [Ember](https://stenciljs.com/docs/ember).
53+
54+
## Usage
55+
56+
The `<deckgo-inline-editor/>` should be added once only in your page. It will interact with all elements of types `p`, `h1`, `h2` and `h3` you would have set as `contenteditable`.
57+
58+
### Properties
59+
60+
The `<deckgo-inline-editor/>` expose the following properties:
61+
62+
| Property | Attribute | Description | Type | Default |
63+
| --------------------- | ----------------------- | ----------- | --------- | ----------- |
64+
| `mobile` | `mobile` | The mobile mode is automatically recognize, but just it case you would like to "force" it | `boolean` | `false` or `true` according the device |
65+
| `stickyDesktop` | `sticky-desktop` | Use a sticky footer toolbar on desktop | `boolean` | `false` |
66+
| `stickyMobile` | `sticky-mobile` | Use a sticky footer toolbar on mobile. Note: except iOS, feel free to send a PR if you know how to handle this with the software keyboard | `boolean` | `false` |
67+
| `toolbarOffsetStart` | `toolbar-offset-start` | A left offset for the toolbar when not sticky | `number` | `undefined` |
68+
| `toolbarOffsetTop` | `toolbar-offset-top` | A top offset for the toolbar when not sticky | `number` | `undefined` |
69+
70+
### Styling
71+
72+
The `<deckgo-inline-editor/>` could be styled using the following CSS4 variables which would only applies on the type `<svg/>`:
73+
74+
| CSS4 variable | Default | Note |
75+
| -------------------------- |-----------------|-----------------|
76+
| --deckgo-inline-editor-background-top | rgba(56, 128, 255, .99) | The top background of the toolbar (linear gradient) |
77+
| --deckgo-inline-editor-background-bottom | #3171e0 | The bottom background of the toolbar (linear gradient) |
78+
| --deckgo-inline-editor-border-radius | 8px | The border radius of the toolbar |
79+
| --deckgo-inline-editor-padding | 0 8px | The padding of the toolbar |
80+
| --deckgo-inline-editor-zindex | 1 | The z-Index of the toolbar |
81+
| --deckgo-inline-editor-sticky-bottom | 0 | The bottom attribute of the sticky toolbar |
82+
| --deckgo-inline-editor-separator-background | rgba(255, 255, 255, .2) | The color of the separator |
83+
| --deckgo-inline-editor-button-color | #fff | The buttons color |
84+
| --deckgo-inline-editor-button-font-size | 1.4rem | The buttons font size |
85+
| --deckgo-inline-editor-button-font-family | inherit | The buttons font family |
86+
| --deckgo-inline-editor-button-font-size-h2 | 1.2rem | The button h2 font size |
87+
| --deckgo-inline-editor-button-font-size-h3 | 1rem | The button h3 font size |
88+
| --deckgo-inline-editor-button-color-active | #ffce00 | The color of the buttons when active |
89+
| --deckgo-inline-editor-button-color-disabled | #4c8dff | The color of the buttons when disabled |
90+
| --deckgo-inline-editor-link-color | #fff | The color of the input field for the url |
91+
| --deckgo-inline-editor-link-placeholder-color | #fff | Ther color of the placeholder of the input field for the url |
92+
93+
Furthermore, the following variables are also available but only have an effects on mobile devices:
94+
95+
| CSS4 variable | Default | Note |
96+
| -------------------------- |-----------------|-----------------|
97+
| --deckgo-inline-editor-mobile-box-shadow | 0 0px 1px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.15) | A box shadow for the toolbar |
98+
| --deckgo-inline-editor-mobile-background-top | #fff | ** |
99+
| --deckgo-inline-editor-mobile-background-bottom | #fff | ** |
100+
| --deckgo-inline-editor-button-mobile-color-active | #3880ff | ** |
101+
| --deckgo-inline-editor-button-mobile-color-disabled | #f4f5f8 | ** |
102+
| --deckgo-inline-editor-separator-mobile-background | #f4f5f8 | ** |
103+
| --deckgo-inline-editor-link-mobile-color | inherit | ** |
104+
| --deckgo-inline-editor-link-mobile-placeholder-color | inherit | ** |
105+
106+
** like above but for mobile
107+
108+
### Examples
109+
110+
```
111+
<p contenteditable>This text will be editable</p>
112+
113+
<h1 contenteditable>This title too</h1>
114+
115+
<deckgo-inline-editor></deckgo-inline-editor>
116+
```
117+
118+
[DeckDeckGo]: https://deckdeckgo.com

docs/package-lock.json

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "deckdeckgo-docs",
3-
"version": "1.0.0-alpha.3",
3+
"version": "1.0.0-alpha.4",
44
"description": "The Progressive Web App alternative for simple presentations",
55
"license": "MIT",
66
"files": [
@@ -18,6 +18,7 @@
1818
"deckdeckgo": "^1.0.0-beta.26",
1919
"deckdeckgo-charts": "^1.0.0-alpha.5",
2020
"deckdeckgo-highlight-code": "^1.0.0-alpha.11",
21+
"deckdeckgo-inline-editor": "^1.0.0-alpha.3",
2122
"deckdeckgo-qrcode": "^1.0.0-alpha.6",
2223
"rxjs": "^6.4.0"
2324
},

docs/src/app/app-root.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export class AppRoot {
9393
<ion-route url="/components/charts" component="app-components-charts"/>
9494
<ion-route url="/components/gif" component="app-components-gif"/>
9595
<ion-route url="/components/code" component="app-components-highlight-code"/>
96+
<ion-route url="/components/inline-editor" component="app-components-inline-editor"/>
9697
<ion-route url="/components/qrcode" component="app-components-qrcode"/>
9798
<ion-route url="/components/social" component="app-components-social"/>
9899
<ion-route url="/components/youtube" component="app-components-youtube"/>
@@ -159,6 +160,7 @@ export class AppRoot {
159160
<ion-item href="/components/charts" routerDirection="forward"><ion-label>Charts</ion-label></ion-item>
160161
<ion-item href="/components/gif" routerDirection="forward"><ion-label>Gif</ion-label></ion-item>
161162
<ion-item href="/components/code" routerDirection="forward"><ion-label>Highlight Code</ion-label></ion-item>
163+
<ion-item href="/components/inline-editor" routerDirection="forward"><ion-label>WYSIWYG inline editor</ion-label></ion-item>
162164
<ion-item href="/components/qrcode" routerDirection="forward"><ion-label>QR Code</ion-label></ion-item>
163165
<ion-item href="/components/social" routerDirection="forward"><ion-label>Social</ion-label></ion-item>
164166
<ion-item href="/components/youtube" routerDirection="forward"><ion-label>Youtube</ion-label></ion-item>

0 commit comments

Comments
 (0)