Skip to content

Commit 1d3226a

Browse files
committed
Added url config option for j-CloudEditor and j-CloudEditorSimple.
1 parent 18b1f2c commit 1d3226a

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

j-CloudEditor/component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
COMPONENT('cloudeditor', 'parent:auto;autosave:1;realtime:0;margin:0', function(self, config) {
1+
COMPONENT('cloudeditor', 'parent:auto;autosave:1;realtime:0;margin:0;url://cdn.componentator.com/editor/1.min.html', function(self, config) {
22

33
var iframe;
44
var savetimeout;
@@ -84,7 +84,7 @@ COMPONENT('cloudeditor', 'parent:auto;autosave:1;realtime:0;margin:0', function(
8484
var protocol = location.protocol;
8585
if (protocol === 'file:')
8686
protocol = 'http:';
87-
self.append('<iframe src="{1}//cdn.componentator.com/editor/1.min.html?id={0}" frameborder="0" scrolling="no" allowtransparency="true" allow="geolocation *; microphone *; camera *; midi *; encrypted-media *" style="width:100%;overflow:hidden;display:block"></iframe>'.format(self.ID, protocol));
87+
self.append('<iframe src="{1}{2}?id={0}" frameborder="0" scrolling="no" allowtransparency="true" allow="geolocation *; microphone *; camera *; midi *; encrypted-media *" style="width:100%;overflow:hidden;display:block"></iframe>'.format(self.ID, protocol, config.url));
8888
iframe = self.find('iframe');
8989
self.resize();
9090
$(W).on('message', onmessage);

j-CloudEditor/component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"datecreated": "2022-01-21T20:01:10.000Z",
3-
"dateupdated": "2024-06-17T08:04:00.000Z",
3+
"dateupdated": "2025-02-24T13:02:00.000Z",
44
"name": "j-CloudEditor",
55
"jcomponent": "19|20",
66
"darkmode": true,

j-CloudEditor/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ __Configuration__:
2727
- `keywords {String}` custom keywords in the form e.g. `ID,PATH`
2828
- `minheight {Number}` optional, a minimal height (default: `0`)
2929
- `margin {Number}` optional, a vertical margin (default: `0`)
30+
- __NEW__: `url {String}` optional, a link to the editor (default: `//cdn.componentator.com/editor/1.min.html`)
3031

3132
__Method__:
3233

j-CloudEditorSimple/component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
COMPONENT('cloudeditorsimple', 'parent:auto;autosave:500;margin:0;linenumbers:1;realtime:1;type:clientside', function(self, config) {
1+
COMPONENT('cloudeditorsimple', 'parent:auto;autosave:500;margin:0;linenumbers:1;realtime:1;type:clientside;url://cdn.componentator.com/editor/1.min.html', function(self, config) {
22

33
var iframe;
44
var savetimeout;
@@ -84,7 +84,7 @@ COMPONENT('cloudeditorsimple', 'parent:auto;autosave:500;margin:0;linenumbers:1;
8484
var protocol = location.protocol;
8585
if (protocol === 'file:')
8686
protocol = 'http:';
87-
self.append('<iframe src="{1}//cdn.componentator.com/editor/1.min.html?id={0}" frameborder="0" scrolling="no" allowtransparency="true" allow="geolocation *; microphone *; camera *; midi *; encrypted-media *" style="width:100%;overflow:hidden;display:block"></iframe>'.format(self.ID, protocol));
87+
self.append('<iframe src="{1}{2}?id={0}" frameborder="0" scrolling="no" allowtransparency="true" allow="geolocation *; microphone *; camera *; midi *; encrypted-media *" style="width:100%;overflow:hidden;display:block"></iframe>'.format(self.ID, protocol, config.url));
8888
iframe = self.find('iframe');
8989
self.resize();
9090
$(W).on('message', onmessage);

j-CloudEditorSimple/component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"datecreated": "2022-03-26T19:55:10.000Z",
3-
"dateupdated": "2024-06-17T08:09:00.000Z",
3+
"dateupdated": "2025-02-24T13:01:00.000Z",
44
"name": "j-CloudEditorSimple",
55
"jcomponent": "19|20",
66
"darkmode": true,

j-CloudEditorSimple/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ __Configuration__:
3131
- `margin {Number}` optional, a vertical margin (default: `0`)
3232
- `linenumbers {Boolean}` optional, enables line numbers (default: `true`)
3333
- `type {String}` optional, content-type (default: `clientside`)
34+
- __NEW__: `url {String}` optional, a link to the editor (default: `//cdn.componentator.com/editor/1.min.html`)
3435

3536
__Method__:
3637

0 commit comments

Comments
 (0)