Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Was there a reason a dom (html) wasn't used? #129

Closed
mark-hahn opened this issue Apr 22, 2015 · 5 comments
Closed

Was there a reason a dom (html) wasn't used? #129

mark-hahn opened this issue Apr 22, 2015 · 5 comments

Comments

@mark-hahn
Copy link

I'm considering implementing a node module that renders the DOM into blessed. I'm wondering if there is some fundamental reason this hasn't been done before.

This would run in a headless environment using one of several packages that create a DOM. Obviously some tags wouldn't be supported. And CSS layout would need to be filled out. But blessed is so close to a DOM model I think it might not be a ridiculous idea. In the beginning few tags would be supported but that might be immediately useful. The HTML design would probably need to keep Blessed in mind, but hopefully that html would render approximately to the same thing in a real browser.

My motivation is to port some web-based text editor to blessed. I have wanted an editor that had matching behavior to standard editors instead of VIM. Sort of a nano on steroids.

@mark-hahn
Copy link
Author

Never mind. I just found the terminal editor slap which fills my need and removes my motivation for this. Sorry for the bother.

@chjj
Copy link
Owner

chjj commented Apr 22, 2015

An xml-based language has been made for blessed rendering: https://github.com/kevinhikaruevans/blessedoo

It's not html, but as an advantage, the xml elements are much more consistent with with blessed elements.

@chjj
Copy link
Owner

chjj commented Apr 22, 2015

Also, I should answer your question. The DOM wasn't used because blessed has a different rendering behavior than the CSSOM, and the DOM api itself is flawed.

The reason HTML, or any markup language, wasn't implemented as a feature is because I really think that belongs in a separate module, like the above project.

@mark-hahn
Copy link
Author

I really think that belongs in a separate module, like the above project.

Yes, that is what I was considering doing. It would only make sense to be
included if it started that way. The subject of this thread was a tiny bit
of trolling. Sorry.

On Wed, Apr 22, 2015 at 4:23 PM, Christopher Jeffrey (JJ) <
notifications@github.com> wrote:

Also, I should answer your question. The DOM wasn't used because blessed
has a different rendering behavior than the CSSOM, and the DOM api itself
is flawed.

The reason HTML, or any markup language, wasn't implemented as a feature
is because I really think that belongs in a separate module, like the above
project.


Reply to this email directly or view it on GitHub
#129 (comment).

@cancerberoSgx
Copy link

#112 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants