-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
5,775 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
ProseMirror's view module displays a given [editor | ||
state](#state.EditorState) in the DOM, and handles user events. | ||
|
||
Make sure you load `style/prosemirror.css` as a stylesheet when using | ||
this module. | ||
|
||
@EditorView | ||
|
||
### Props | ||
|
||
@EditorProps | ||
|
||
@NodeViewConstructor | ||
|
||
@MarkViewConstructor | ||
|
||
@DirectEditorProps | ||
|
||
@NodeView | ||
|
||
@DOMEventMap | ||
|
||
### Decorations | ||
|
||
Decorations make it possible to influence the way the document is | ||
drawn, without actually changing the document. | ||
|
||
@Decoration | ||
|
||
@DecorationAttrs | ||
|
||
@DecorationSet | ||
|
||
@DecorationSource |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const nav = typeof navigator != "undefined" ? navigator : null | ||
const doc = typeof document != "undefined" ? document : null | ||
const agent = (nav && nav.userAgent) || "" | ||
|
||
const ie_edge = /Edge\/(\d+)/.exec(agent) | ||
const ie_upto10 = /MSIE \d/.exec(agent) | ||
const ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(agent) | ||
|
||
export const ie = !!(ie_upto10 || ie_11up || ie_edge) | ||
export const ie_version = ie_upto10 ? (document as any).documentMode : ie_11up ? +ie_11up[1] : ie_edge ? +ie_edge[1] : 0 | ||
export const gecko = !ie && /gecko\/(\d+)/i.test(agent) | ||
export const gecko_version = gecko && +(/Firefox\/(\d+)/.exec(agent) || [0, 0])[1] | ||
|
||
const _chrome = !ie && /Chrome\/(\d+)/.exec(agent) | ||
export const chrome = !!_chrome | ||
export const chrome_version = _chrome ? +_chrome[1] : 0 | ||
export const safari = !ie && !!nav && /Apple Computer/.test(nav.vendor) | ||
// Is true for both iOS and iPadOS for convenience | ||
export const ios = safari && (/Mobile\/\w+/.test(agent) || !!nav && nav.maxTouchPoints > 2) | ||
export const mac = ios || (nav ? /Mac/.test(nav.platform) : false) | ||
export const windows = nav ? /Win/.test(nav.platform) : false | ||
export const android = /Android \d/.test(agent) | ||
export const webkit = !!doc && "webkitFontSmoothing" in doc.documentElement.style | ||
export const webkit_version = webkit ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0 |
Oops, something went wrong.