circlejourney / theditor

An HTML and CSS editor for live previewing Toyhouse code as you type, with different layouts and themes.
https://th.circlejourney.net
11 stars 4 forks source link
editor jquery toyhouse

Toyhouse Live Code Editor

An editor with live preview for Toyhouse themes. View changes as you type, in various site skins/themes and page layouts.

Previewing on local server

To preview a local copy of the code, you will need to Install XAMPP from Apache Friends. Once you add XAMPP's programme directory to your PATH variable, navigate to the theditor root directory in the command line and start a local server:

php -S localhost:8000

Once you've started up the server, you can view a local preview of the code editor by navigating to the url localhost:8000 in your web browser.

Directory tree

Dependencies and copyright

This editor uses jQuery, Ace Editor, ace-colorpicker, Bootstrap, Font Awesome, Foundation Icons, and of course the Toyhouse source files. The source files are included in the codebase. I do not own any of these libraries or resources.

How to guides

General

Edit code editor functionality

Adding a new page layout

Set up import credentials

Since Version 1.10.3, the code editor's importer now authenticates itself with Toyhouse so that it can retrieve guest-blocked profiles. The live production version uses Circlejourney's bot account fuchsiamoonrise, but these are not committed to the repo for security purposes.

To make the feature work in full, you can set up your local version to log in with your own Toyhouse credentials. To do so, create a file called settings.conf one directory above the editor's root directory. For example, if the editor is in C:/theditor, settings.conf should be in C:/.

settings.conf is formatted as a PHP ini file containing two settings: a username and a password. The structure of this file is demonstrated in settings.conf.example. This file should not be committed to the repository.

Thank yous

Huge thank you Min for very kindly shared their Font Awesome Pro courtesy of subscription with us 💙 This gives us access to premium FA icons.

And thank you venfaaniik for collaborating with me on the colour picker extension for Ace—your time and help are much appreciated!