Andrew Shell posted a note to the mail list yesterday saying he wanted to use the Handlebars template system inside MWE.

To do so, he's replacing a core routine, multipleReplaceAll. This is too good a routine to give up to such a cause, so I created a shell in v0.65 for him to replace.

The shell is called getRenderedText, and it basically calls multipleReplaceAll. Andrew please use this instead.

If the idea of other templating systems catches on, we'll need to formalize this a bit more.

04/09/15; 09:08:53 AM

New in MyWord Editor v0.64.

There's a new config.json element, config.startupCode.

After MWE has finished booting up, it runs this through the built-in eval function.

This has proved useful in Fargo, and other apps, as a way for clever JavaScript devs to extend the environment in some interesting ways. Have fun, but be careful!

The default value is a console.log call that basically says Hello World.

04/03/15; 03:21:18 PM

I did a little work this week that makes it possible for JavaScript programmers to replace the editor in MyWord Editor. This is in v0.63.

There's a new folder in the repository called editor. If you want to use a different editor, say TinyMCE, Dante, medium.js, the editor in Ghost, or whatever you like, just replace the three routines in scripts.js in your fork. Having this off in a separate folder gives you space to build functionality you may need.

I wrote a bunch more about it on my MyWord blog, with pointers to blog posts with thinking about the editor.

04/02/15; 04:19:25 PM

You can include Disqus comments in a MyWord Editor site, starting with v0.62.

  1. To enable or disable the feature, visit the CMS tab in Settings. You can turn comments off (they're on by default), or specify a Disqus group. If you want to get email notification of comments on your site, you must change the group.

  2. Comments are provided for in the default and plain templates. If you're writing your own template, you can include comments with the [%disquscomments%] macro.

  3. Here's an example of a page with comments. Feel free to party in the comments section.

  4. This is not an April Fool joke.

04/01/15; 08:35:33 AM

New in MyWord Editor v0.60 -- templates.

A quick tour of how they work for writers.

  1. There's a new menu in MyWord Editor with the names of all the templates that are available. When you publish a page, we use the template you've chosen.

  2. There's a default template. You can change it in the new CMS panel of Settings.

  3. The sysop can change the contents of the templates popup in config.json.

There's much more info about the feature on this page, which uses the Plain template.

Technical stuff

A template consists of a name and the URL of an HTML file containing the page template.

The Plain template is a good place to start if you want to see how templates are made.

Where you see macros, in this [%syntax%], we substitute a value from the pagetable.

Items that have ID attributes, like idEssayText and idVersionNumber, are set by the startup script. Your choice. Static substitution, or set by script at read-time. Or elements could be fully dynamic, even AJAXy. I wanted to have the full power of scripting available in the template platform.

You can override everything. That's a basic principle. (Maybe not an absolute.)

Roadmap

This is the central feature to the blogging software. In a sense everything is peripheral to the way content flows from author through the templates to the web. If it's done well, at the point of connections, designers can have the maximum power. And we want sysops to have the max flexibility, and make it as easy as possible to host and maintain templates.

Breakage alert

There will certainly be breakage from this point. This is the first place where users and designers get involved in the template process, and this is new software, so it's flexible. Things can change now without breaking an installed base. We're going to take advantage of that.

You will have questions

I do too. Post them here as comments or on the mail list. Even better, write a blog post, and post a link.

03/30/15; 12:53:36 PM

In this version of we release the last bits, the JavaScript code and CSS styles used in rendering the pages that are generated by MyWord Editor.

The notes below are important to understand what's been released and how you can use it.

  1. The default template that I provide is still wired to the versions of these files on myword.io.

  2. You can modify the default template for your installation in any way you like. That's the point of having a template, so that people can change the appearance of rendered pages without modifying the CMS software.

  3. As part of those modifications, you can point to different versions of the JS and CSS files.

  4. Or you can still point to my copies, and override any style or script you want with your own versions.

  5. I hope to have more template-related features before too long.

  6. The files are in the templates folder in the repository.

03/27/15; 03:39:33 PM

In MyWord Editor v0.58 there's a new History menu.

When you choose an item in the menu, its title, description, image URL and body text appear in the dialog. You can edit them, publish, whatever.

If you change the title of a post, or add a new one, the History menu automatically updates.

The Open file command is no longer needed, so it was removed.

03/27/15; 11:49:15 AM

One feature, three fixes in MyWord Editor v0.55.

  1. Each post now has a sidebar, which you can access by clicking on the hamburger icon in the upper left corner of the page. When you open it, you'll see a list of recent posts. The current post is displayed bold. Click on any other post to view it. This list is generated from the RSS feed for the user's blog. Here's a post that illustrates.

  2. Fixed a CSS problem that had list line-height fixed in some cases. All paragraphs in the body should now have a height of 145%.

  3. When generating <description> elements in the feed for the blog, we pass it through a markdown interpreter, since the assumption is that all text in MWE is markdown. If it's markdown text, we also generate a <source:markdown> element that contains the original text, so if the RSS reader app can understand markdown it could do something special with it.

  4. Modified the default template so it includes the title, description and body text in the page elements, not just in the pagetable. This should guarantee that the text is picked up by the search engines. Let's watch for this and see if it does.

03/26/15; 11:42:38 AM

We now have an easy way to host your myword.io blog on another server. This will expand, get simpler and easier, and less buggy, I promise. But for now this is how you do it.

How to

  1. In MyWord Editor, choose Switch server in the Editor menu.

  2. Enter the URL of one of my servers, http://twitter.noteblog.io/

  3. Important: It must be in exactly that form, no trailing blanks, the final slash must be present.

  4. Click OK. You should be redirected to Twitter with a page asking you to authorize noteblog.io. Authorize it.

  5. You should be brought back to the editor. Fill in the form with a new post, click Publish, then OK to visit the page.

That's it. You should now have a post on noteblog.io. Here's an example. Please test this and report back via the mail list or a comment here.

If it all worked

You should now have an essay on noteblog.io, which is a spare nodeStorage server I had. It's a plain vanilla server, installed from the nodeStorage source on GitHub.

If you have your own nodeStorage server, you should be able to substitute your domain for mine, and repeat the process. Just remember, it must be in the form of a URL, or it won't work. (See #3 above.)

How this will improve

You will be able to put a JSON file in the same directory as your copy of MWE that says where your server is, so the user doesn't have to do anything special to set it up, and you don't have to modify the MWE source to start your own hosting service.

Roadmap for deployment

I am announcing this on the server-snacks mail list for testing with people who have nodeStorage servers set up, and on the myword-editor mail list for people who are testing the editor. I'm doing this before opening MWE to the public, so on Day One there may be a number of servers they can use, not just mine. At least we will have tested it's silo-freeness, and been sure that it works.

I will also release the full source for MWE in a GitHub repository. This should allow compatible experimentation and innovation in editors.

Here's a Scripting News blog post explaining the philosophy.

03/20/15; 09:20:01 AM

One new feature, a couple of fixes.

  1. If you want to open a file you created previously, choose Open File from the Editor menu. Make changes, publish, everything should work.

  2. Autosave is now more conservative, only saving after a second of idleness. So if you want to save, just let up on the keyboard as you type. In the upper right corner of the screen next to the version is a SAVED indicator. It flashes while MWE is saving.

  3. There was a bug where blank lines would accumulate at the end of the document. This has been fixed.

If you want to try it out

Leave a comment below with your Twitter ID.

If you have problems use the mail list.

Don't forget how to ask for help with software.

03/07/15; 11:31:20 AM

MyWord Editor is a simple browser-based editor that publishes to the web.

Example

Here's an example of the kind of document it produces.

How to

To create a new document, just load the MyWord Editor page, if a document is already present, choose the New command in the Editor menu. The fields of the form clear. Enter a title, description and body for the post.

The text is automatically saved as you type.

When you want to publish your essay, choose Publish from the Publish menu. To view the published page, click OK on the confirmation dialog that appears.

Advanced features

  1. In the Publish menu, choose View story to view the published page.

  2. In the Editor menu, choose View RSS feed to view the feed containing your essays.

  3. Choose Get JSON backup to view an data file (in JSON) containing all your posts, so you can transfer them to another account or application, or to serve as a backup.

Using Markdown

You can use Markdown in a limited form, but you have to turn it on first.

  1. Choose the Settings command from the system menu (it's at the right edge of the menu bar, the menu with your username as its title).

  2. In the Publish panel, click the checkbox for "Use the Markdown processor."

  3. Click OK.

There are limits to our Markdown support.

  1. Markdown works within paragraphs, so if you put asterisks around some text, you'll get italic text. And you can put pound signs in front of a headline to get it properly boldened and enlarged.

  2. But any Markdown construct that spans more than one paragraph is ignored. The Markdown model says they don't look inside paragraphs, a good policy. So there's a little bit of Markdown support in here, not full support.

Support mail list

If you have questions post them here as a comment, or on the support mail list.

03/06/15; 10:23:07 AM

Last built: Sun, Oct 25, 2015 at 12:24 PM

By Dave Winer, Sunday, October 25, 2015 at 12:24 PM.