How to use HTML template with Vaadin? - html

I am new to Vaadin.
I have created template for my web application in HTML and JS.
How to use the developed template with Vaadin as am not sure if I will be able to develop same template using Vaadin only?

It may be possible to re-use some of the layout of the template using the CustomLayout layout component in Vaadin.
You can also render the contents of a template into a Label component, and display the label in the application. See http://demo.vaadin.com/sampler#LabelRich for a small demo.
Generally, though, the idea of templates and "pages" is orthogonal to developing applications in Vaadin.

Related

Extract Angular components to plain HTML + CSS

I have an angular app that I need to use as a source of the components for my new app that will be mostly using pure HTML. I need to get the HTML and CSS from the Angular app.
The problem is, that the app uses custom components such as <mat-icon> that are not standard HTML tags. I assume, that under the hood they eventually consist of simple HTML elements but I can't figure it out. Is there any method to convert an Angular website to plain HTML & CSS? I know that the dynamic content can't be extracted, but I mean only the view. Maybe there is a Chrome extension to do that? I do have access to the app source code, so it can be also some npm module.

Angular 7: Dynamically generate template

I'm rewriting my website https://ixtutor.com/ completely in angular. I've created few components that render as widgets on a blog page.
For example, on a blog post https://ixtutor.com/tensorflow-basics-with-housing-prices-prediction-example-chapter-i/ , there are widgets like,
(i) Code runner widget
(ii) Exercise widget
I'm modeling these widgets as components in my angular application.
Problem: One of the page in my application is a live html editor, which allows an author to write the (angular) html templates in a textarea T1 and see the (rendered) view side-by-side. I also want the author to be able to use the widget components in the html that they create.
This works great with regular html tags, where I can use the innerHTML property of a div to directly bind the ngModel of the textarea T1, however, it doesn't work for the angular components.
I've looked at dynamic angular components but I cannot figure out how to use that in a full-fledged html template. Any recommendations or suggestions will be really appreciated.
Thanks.
Angular does not support inserting dynamic components in the template at runtime. It has to know at compile time which components will be inserted.
The only way is to compile your Angular components to web components using Angular elements, that way, you will be able to insert them as custom HTML elements in your application.
You will have to develop them in a separate library for this.

Is it possible to preview Angular template?

Is there a way to preview Angular template (i.e. see how HTML would be rendered) without starting the whole application?
I'm working on CSS styling and it would be easier to be able to see changes immediately.
Is there a way to preview Angular template (i.e. see how HTML would be
rendered) without starting the whole application?
You can't. There's only one way which is starting your Angular application. One reason is that in the Angular application, your CSS doesn't directly affect the HTML like in a normal standalone webpage.

HTML email template builder using Delphi

I want to build an interactive html page builder using drag n drop.
Basically it will have elements like image, section, text etc which a user can use to build a HTML page.
Any suggestions for third party Delphi components which I can use for HTML editor?
Have a look at HTML Component Library. It includes an editor. Check this blog post for an introduction HTMLComponents, the native Delphi html rendering engine

What's the best way to convert HTML/JS project to GWT

A designer company have made a prototype of a web application using HTML/CSS/JS, with forms, menus, roll-over sub-menus ... Now I have to take this prototype and build GWT views using widgets.
My question is : Do I have to start from scratch and build every view with UIBuinders and integrate the CSS files or there is an easy way to do this ?
Thanks
My suggestion - don't generate HTML. This basically means not using GWT widgets (or only using widgets that provide .wrap(element) method.
I'm taking this approach with my projects and works very well. I put all HTML in one big file and then hide (display: none) all divs. Then I use gwtQuery to identify, copy and show relevant parts. qwtQuery is also used inject behavior (event handlers).