Just Created a Working Instance of TinyMCE

One of the more-interesting features of JavaScript in years gone by, was the in-browser HTML editor named ‘TinyMCE’. What this scriptlet does, is run on the browser, and allow people to edit the contents of a <textarea>, in WYSIWYG style, for submission to an arbitrary Web-application.

For me, this piece of JavaScript has little use. Other Web-applications of mine, already give me HTML editing which is rich enough, not to depend on TinyMCE. But there has been a facet of this scriptlet, which has irked beginning-users and Web-designers so far, which is that by default, it offers no ‘Save’ Menu-entry. The reason it does not is twofold:

  1. TinyMCE is meant to be integrated into some more-complex Web-page, where its input is also given a defined purpose, and
  2. By itself, this scriptlet just runs on the browser, from where it has no privilege to store its edited contents anywhere, neither on the server, nor on the client-machine running the browser.

And so some people have wondered, how they could exploit this amazing technology, just to save the edited HTML locally, to the hard-drive of the computer running the browser. And there are many possible ways to solve that problem, out of which I’ve just implemented one:

It’s possible to add a ‘Submit’ button, which sends the edited content to the server, which can in turn display it as a Web-page, that the user can save to his hard drive, using the “Save Page As…” Menu-command belonging to his browser. I cannot think of a solution that would be easier. However, if somebody wanted to use this mechanism, then next, he’d also need to open the .HTML-File saved to his hard-drive, and edit out the parts of it, that make it a Web-page, thus editing the saved HTML-File down to just the part that displays between the <body>…</body> tags.

https://dirkmittler.homeip.net/tinymce/plugin/tinymce

Enjoy.

(Update 2018/08/13 : )

Because this example of JavaScript sends the text to my server, which echos it back to the browser, I suppose that in theory I could reprogram my CGI-script, to keep a complete record of all the text-fragments submitted. But in practice, I see no point in doing so, and therefore also keep no record of what has been typed.

In addition, because I’ve suggested the URL as an ‘httpS://’ URL, a Secure Socket Layer gets used, so that No user will need to worry about the communication itself, to and from my server, being monitored by any third party.

Dirk

 

Revisiting HTML, this time, With CSS.

When I first taught myself HTML, it was in the 1990s, and not only has the technology advanced, but the philosophy behind Web-design has also changed. The original philosophy was, that the Web-page should only contain the information, and that each Web-browser should define in what style that information should be displayed. But of course, when Cascading Style-Sheets were invented – which in today’s laconic vocabulary are just referred to as “Styles” – they represented a full reversal of that philosophy, since by nature, they control the very appearance of the page, from the server.

My own knowledge of HTML has been somewhat limited. I’ve bought cuspy books about ‘CSS’ as well as about ‘JQuery’, but have never made the effort to read each book from beginning to end. I mainly focused on what some key concepts are, in HTML5 and CSS.

Well recently I’ve become interested in HTML5 and CSS again, and have found, that to buy the Basic license of a WYSIWYG-editor named “BlueGriffon“, proved informative. I do have access to some open-source HTML editors, but find that even if they come as a WYSIWIG-editor, they mainly tend to produce static pages, very similar to what Web-masters were already creating in the 1990s. In the open-source domain, maybe a better example would be “SeaMonkey“. Beyond that, ‘KompoZer‘ can no longer be made to run on up-to-date 64-bit systems, and while “BlueFish”, a pronouncedly KDE-centric solution available from the package-manager, does offer advanced capabilities, it only does so in the form of an IDE.

(Updated 03/09/2018, 17h10 : )

Continue reading Revisiting HTML, this time, With CSS.