@silexlabs/silex 3.0.0-alpha.170 → 3.0.0-alpha.172
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexlabs/silex",
|
|
3
3
|
"description": "Free and easy website builder for everyone.",
|
|
4
|
-
"version": "3.0.0-alpha.
|
|
4
|
+
"version": "3.0.0-alpha.172",
|
|
5
5
|
"version:backwardcompat": "3.0.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Alex Hoyau",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"@fortawesome/fontawesome-free": "6.6.0",
|
|
106
106
|
"@silexlabs/grapesjs-filter-styles": "^1.0.0",
|
|
107
107
|
"@silexlabs/grapesjs-fonts": "^1.0.20",
|
|
108
|
-
"@silexlabs/grapesjs-keymaps-dialog": "^1.0.
|
|
108
|
+
"@silexlabs/grapesjs-keymaps-dialog": "^1.0.16",
|
|
109
109
|
"@silexlabs/grapesjs-loading": "1.0.9",
|
|
110
110
|
"@silexlabs/grapesjs-notifications": "^0.0.8",
|
|
111
111
|
"@silexlabs/grapesjs-storage-rate-limit": "^1.0.8",
|
|
@@ -59,7 +59,7 @@ import { blocksPlugin } from './blocks'
|
|
|
59
59
|
import { semanticPlugin } from './semantic'
|
|
60
60
|
import { orderedList, richTextPlugin, unorderedList } from './rich-text'
|
|
61
61
|
import { internalLinksPlugin } from './internal-links'
|
|
62
|
-
import {defaultKms, keymapsPlugin
|
|
62
|
+
import {defaultKms, keymapsPlugin} from './keymaps'
|
|
63
63
|
import publicationManagerPlugin, { PublicationManagerOptions } from './PublicationManager'
|
|
64
64
|
import ViewButtons from './view-buttons'
|
|
65
65
|
import { storagePlugin } from './storage'
|
|
@@ -357,7 +357,8 @@ export function getEditorConfig(config: ClientConfig): EditorConfig {
|
|
|
357
357
|
reverse: true,
|
|
358
358
|
},
|
|
359
359
|
[keymapsDialogPlugin.toString()]: {
|
|
360
|
-
|
|
360
|
+
longPressDuration: null,
|
|
361
|
+
shortcut: 'shift+h',
|
|
361
362
|
},
|
|
362
363
|
[navbarPlugin.toString()]:{
|
|
363
364
|
block:{
|
|
@@ -79,9 +79,7 @@ export const settingsDialog = (editor, opts) => {
|
|
|
79
79
|
model.set('settings', data.settings || {})
|
|
80
80
|
model.set('name', data.name)
|
|
81
81
|
editor.once('canvas:frame:load', () => {
|
|
82
|
-
|
|
83
|
-
updateDom(editor)
|
|
84
|
-
})
|
|
82
|
+
updateDom(editor)
|
|
85
83
|
})
|
|
86
84
|
})
|
|
87
85
|
// Normal way to apply the head content to the DOM
|
|
@@ -272,12 +270,15 @@ function updateDom(editor) {
|
|
|
272
270
|
const settings = editor.getModel().get('settings')
|
|
273
271
|
const pageSettings = editor.Pages.getSelected().get('settings')
|
|
274
272
|
if(doc && settings) {
|
|
275
|
-
//
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
273
|
+
// Delay the update to let the DOM be ready
|
|
274
|
+
setTimeout(() => {
|
|
275
|
+
// Site head
|
|
276
|
+
getHeadContainer(doc, 'site-head')
|
|
277
|
+
.innerHTML = settings.head || ''
|
|
278
|
+
// Pages head
|
|
279
|
+
getHeadContainer(doc, 'page-head')
|
|
280
|
+
.innerHTML = pageSettings?.head || ''
|
|
281
|
+
})
|
|
281
282
|
} else {
|
|
282
283
|
// No document??
|
|
283
284
|
}
|
package/src/ts/client/utils.ts
CHANGED
|
@@ -60,8 +60,9 @@ export function selectBody(editor: Editor): void {
|
|
|
60
60
|
* @param element The element to check.
|
|
61
61
|
*/
|
|
62
62
|
export function isTextOrInputField(element: HTMLElement): boolean {
|
|
63
|
-
|
|
64
|
-
const
|
|
63
|
+
if(element.getAttribute('type') === 'submit') return false
|
|
64
|
+
const isInput: boolean = element.tagName === 'INPUT'
|
|
65
|
+
const isOtherFormElement: boolean = ['TEXTAREA', 'OPTION', 'OPTGROUP', 'SELECT', 'BUTTON'].includes(element.tagName)
|
|
65
66
|
|
|
66
67
|
return isInput || isOtherFormElement
|
|
67
68
|
}
|