www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - D Wiki: run.dlang.io integration?

reply WebFreak001 <d.forum webfreak.org> writes:
Is there a way to integrate some kind of "run this source code" 
button into the D wiki using run.dlang.io?

If there isn't, it would be nice to add this kind of thing as 
plugin with the possibility of also including the editor so you 
never need to leave the wiki. (like on the D Tour)
Jul 16 2020
parent reply aberba <karabutaworld gmail.com> writes:
On Thursday, 16 July 2020 at 09:47:02 UTC, WebFreak001 wrote:
 Is there a way to integrate some kind of "run this source code" 
 button into the D wiki using run.dlang.io?

 If there isn't, it would be nice to add this kind of thing as 
 plugin with the possibility of also including the editor so you 
 never need to leave the wiki. (like on the D Tour)
Since its based on WikiMedia, searched an came up with this [1] to embed in iframe 1. https://www.mediawiki.org/wiki/Extension:Iframe
Jul 16 2020
parent reply aberba <karabutaworld gmail.com> writes:
On Thursday, 16 July 2020 at 13:41:31 UTC, aberba wrote:
 On Thursday, 16 July 2020 at 09:47:02 UTC, WebFreak001 wrote:
 [...]
Since its based on WikiMedia, searched an came up with this [1] to embed in iframe 1. https://www.mediawiki.org/wiki/Extension:Iframe
Also the D Tour uses codemirror [1] which has an extension for wikimedia [2] 1. https://codemirror.net/index.html 2. https://www.mediawiki.org/wiki/Extension:CodeMirror
Jul 16 2020
parent reply WebFreak001 <d.forum webfreak.org> writes:
On Thursday, 16 July 2020 at 13:54:56 UTC, aberba wrote:
 On Thursday, 16 July 2020 at 13:41:31 UTC, aberba wrote:
 On Thursday, 16 July 2020 at 09:47:02 UTC, WebFreak001 wrote:
 [...]
Since its based on WikiMedia, searched an came up with this [1] to embed in iframe 1. https://www.mediawiki.org/wiki/Extension:Iframe
Also the D Tour uses codemirror [1] which has an extension for wikimedia [2] 1. https://codemirror.net/index.html 2. https://www.mediawiki.org/wiki/Extension:CodeMirror
Yeah an extension combining CodeMirror and adding another tab or splitting the container for the output, executed by run.dlang.io would be a cool addition to the wiki and would not be blocked as easily as iframes.
Jul 16 2020
parent aberba <karabutaworld gmail.com> writes:
On Thursday, 16 July 2020 at 14:17:10 UTC, WebFreak001 wrote:
 On Thursday, 16 July 2020 at 13:54:56 UTC, aberba wrote:
 On Thursday, 16 July 2020 at 13:41:31 UTC, aberba wrote:
 On Thursday, 16 July 2020 at 09:47:02 UTC, WebFreak001 wrote:
 [...]
Since its based on WikiMedia, searched an came up with this [1] to embed in iframe 1. https://www.mediawiki.org/wiki/Extension:Iframe
Also the D Tour uses codemirror [1] which has an extension for wikimedia [2] 1. https://codemirror.net/index.html 2. https://www.mediawiki.org/wiki/Extension:CodeMirror
Yeah an extension combining CodeMirror and adding another tab or splitting the container for the output, executed by run.dlang.io would be a cool addition to the wiki and would not be blocked as easily as iframes.
From my quick lookup, its seems after embedded in your WikiMedia instances, it exposes a JavaScript API to monitor change and then execute the code. If run.dlang.io has a rest API of some kind, have to look up how it's done in tour, then its a matter of showing the code in a bottom div. Not familiar with the WikiMedia extension system but having it as a reusable component will be the ideal approach.
 I rather we go for a modernized wiki platform.
Jul 16 2020