Deit Editor
Jason Jeffory via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jan 3 14:29:00 PST 2016
On Sunday, 3 January 2016 at 18:53:10 UTC, Martin Tschierschke
wrote:
> On Friday, 1 January 2016 at 00:14:08 UTC, Jason Jeffory wrote:
>> Vibe.d uses deit files for html generation. Seems nice but
>> haven't dived into it(just removes a but of nonsense and
>> allows code integration for dynamic generation... sounds
>> great!!).
>>
>> But what about visual editing? It's nice to be ale to see the
>> layout of the page directly without all the hassle of toggling
>> back and forth between a browser and code editor. Also, there
>> is the issue of syntax highlighting, code validation, etc...
>>
>> I came across this
>>
>> http://stackoverflow.com/questions/16080350/using-jade-with-wysiwyg-markdown-to-allow-users-to-edit-content
>>
>> Any ideas to make life easier? (isn't that what it's all
>> about?)
>
> There was an answer pointing to
> https://www.npmjs.org/package/html2jade
> and this to http://html2jade.aaron-powell.com/, which allows
> you to convert online HTML to JADE.
> So you can make your HTML layout on an traditional way and get
> the jade code.
Doesn't help much because it is not maintainable?
But one could modify the tool to add additional functionality
with a custom tag?
Use any standard html editor that won't crap out on a custom tag
and then insert D code into it?
e.g.
<!doctype html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="/site.css" />
<title>Hello</title>
</head>
<!--<DCode>
var x = 3;
</DCode>
--!>
<body>
<h1>Hello world!</h1>
</body>
</html>
Then the tool essentially replaces the <DCode> tags to work with
Deit.
Of course, debugging, syntax highlighting, etc has to come from
somewhere else but if we can import stuff, then just using import
statements would work, and we could create a mock up for
debugging the D code easier?
e.g.
<!doctype html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="/site.css" />
<title>Hello</title>
</head>
<!--<DCode>
import DCode_HelloDoc1;
foo();
</DCode>
--!>
<body>
<h1>Hello world!</h1>
</body>
</html>
In which case the HTML to Deit translation should be maintainable
and if one could easily create a way to test the imported
code(one could at least open them in D code editor), then it
should all work... (Of course, would be nice if we didn't have to
jump through so many hoops to do simple stuff)
You see any issues with this method?
More information about the Digitalmars-d-learn
mailing list