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

Allow using Views directly in TemplateDefinition #5260

Closed
oleq opened this issue Oct 19, 2016 · 0 comments · Fixed by ckeditor/ckeditor5-ui#89
Closed

Allow using Views directly in TemplateDefinition #5260

oleq opened this issue Oct 19, 2016 · 0 comments · Fixed by ckeditor/ckeditor5-ui#89
Assignees
Labels
package:ui type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Milestone

Comments

@oleq
Copy link
Member

oleq commented Oct 19, 2016

A follow-up of ckeditor/ckeditor5-ui-default#67.


To speed–up the process of creating the UI structure, passing views directly into template definition like this should be allowed:

constructor( locale ) {
    super( locale );

    // TODO we still need to specialise those buttons (their type).
    this.okButton = new ButtonView( locale );
    this.cancelButton = new ButtonView( locale );
    this.unlinkButton = new ButtonView( locale );
    this.urlInput = new LabeledInputView( locale );

    this.template = new Template( {
        tag: 'div',
        attributes: [
            class: [ 'ck-link-form' ]
        ],
        children: [
            this.urlInput,
            {
                tag: 'div',
                attributes: {
                    class: [ 'ck-link-form-footer' ]
                },
                children: [
                    this.okButton,
                    this.unlinkButton
                ]
            },
            this.unlinkButton
        ]
    } );
}
@oleq oleq self-assigned this Oct 19, 2016
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-ui Oct 9, 2019
@mlewand mlewand added this to the iteration 4 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:ui labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:ui type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants