I was dreaming about a text editor with specific functionalities (reasons will given at the end) in relation with HTML and CSS.
- block level tags shouldn't appear in the editable part, but in the status bar (or the margin)
- span level tags wouldn't be written in the editable part either; for instance, words within a span would appear with a particular background, and hovering would reveal the underlying tags
- other tags not explicitly declared (for example, using a class-aware or CSS-aware preferences file) as block or span would be ignored, and appear unmodified in the editing window
The editor would then react differently to keyboard/copy-paste input depending on the context. For instance:
- The
Enter
key would split the lowermost block level container in two - and also split every span container in two.
- Selecting text could be done in two modes: A) pure text selection (spans included); B) block level selection.
- Pasting selection made in A) mode would only paste the content (text + spans), except if it encompasses two or more block level tags or starts/end in a span ; in which case it would insert and split accordingly, using similar rules as 1. and 2. above.
- Pasting a selection made in B) mode at A) level would end the current innermost block and span tags, and insert the selection at the same level.
- Pasting a selection made in B) mode could be made at the B) level also, in which case it would just insert a copy.
- Deletion would be handled along the same lines.
So, why do I need such an editor?
I don't need fancy stuff with presentation. That would be handled elsewhere, at the container level (even if words like "block level" and "span level" above seem to imply the contrary, I'm still able to write basic HTML+CSS).
The pages will be modified frequently and will have sizes going from medium to large (5 to 20 pages of equivalent PDF). Yet their content should be easily readable in the editor, I don't want to go through 10 minutes of deciphering/reading through the HTML syntax each time I want to locate and change something. And I want the changes themselves to be done quickly.
As a bonus, the editor would be able to use the same structural information it already has about the document, for instance to export the content in other formats.
Still, I don't want to use a Wysiwyg editor for this, essentially because I want to be in full control of the structure of my document (and classes, inline styles, events, ...) in order to include relevant javascript + DOM tweaking in it.
Amaya was able to give me a Wysiwyg equivalent to what I want, but it's too strict about the outdated HTML it accepts. And it tries (and fails) to interpret the MathML and SVG in the document. I cannot use it anymore without tweaking the results, and that slows my workflow to a crawl (each downstream modification must be done again after each change of the master document).
I tried other Wysiwyg stuff like BlueGriffon, but due to its general purpose nature, it's inefficient for my simple purposes, and I don't want to pay for a snippets addon to some software I probably won't use in the end.
Editors like Notepad++, Sublime Text, etc. don't give me the functionality I need. Or if they do, I can't find how.
If you have been interested in something similar, what are the results of your search?