Commit Graph

13 Commits

Author SHA1 Message Date
Jos de Jong 2a861a2868 Defined charset="utf-8" and lang="en" in all examples 2020-09-23 10:23:38 +02:00
Josh Kelley 69fbe63f0e
Multi-select mouse events now honor the event's window (#1098)
* Multi-select mouse events now honor the event's window

This prevents errors from opening JSONEditor in a child window (such as `window.open` or third-party libraries like react-new-window).

* Add a demo of showing a JSONEditor in a child window

* Minor spelling fixes

* Further improvements to new window support

Use `event.view` instead of the global `window`. Copy VanillaPicker styles in the example so that the color picker is correctly styled.

* Add 'noopener'

This helps security; otherwise, JavaScript running in the context of the new window can access the original window object via the `window.opener` property, even if it's a different origin.

* Update modal handling for new windows

There are two approaches we could take; we could use the existing modalAnchor property and make callers responsible for setting it, or we could modify the default handling to default to the node's container body. For now, I chose to make callers responsible.

Rename showTransformModal's `anchor` parameter to `container`; as far as I can tell, `anchor` didn't work properly.
2020-09-23 10:06:12 +02:00
Small ce15bb4b37 add timestampFormat (#863)
* add timestampFormat

* use createTextNode instead innerHTML
2019-12-11 11:34:24 +01:00
jos 6bfede956b Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
jos b853ec3f64 Implement color picker. Expose `VanillaPicker`, `ace`, and `Ajv`. 2018-08-22 12:10:15 +02:00
jos 4f72c5e113 Display a colored square left from values containing a color 2018-08-22 09:20:19 +02:00
jos a2b84b2dd8 Updated readme, docs, added example 2016-01-12 12:40:23 +01:00
jos 12214f930a Moved the distribution files from root to the ./dist folder 2015-02-28 20:47:23 +01:00
jos 0db2c35c2b Using brace to load Ace. Ace and jsonlint are now packed by default with JSONEditor. Removed all redundant build stuff for the assets. 2015-02-27 21:54:04 +01:00
jos d6da7f548e Refactored JSONEditor sourcecode to AMD modules 2014-05-29 22:13:37 +02:00
josdejong 8e07ebb711 Switched everything to 2-space indentation 2013-11-15 18:11:50 +01:00
josdejong 5a7a76cf0b Implemented option modes 2013-08-27 22:50:20 +02:00
josdejong b287c4bfbc Replaced ant build script with jake build script. Files moved around. Created package.json and component.json 2013-05-03 22:55:15 +02:00