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

Enable CustomElement to handle content manually #4

Closed
RichiCoder1 opened this issue Jan 28, 2015 · 4 comments
Closed

Enable CustomElement to handle content manually #4

RichiCoder1 opened this issue Jan 28, 2015 · 4 comments
Assignees

Comments

@RichiCoder1
Copy link

Problem

Currently there is no way to pass raw content into the innerHtml of a CustomElement and have it manually processed.
ex:

<x-markdown>
    Title
    ======

    # Items
    ....
</x-markdown>

Attempted to consume the markdown within the CustomElement is impossible, as Aurelia will attempt to process it.

Solution

Add a Metadata extension which allows you to signal Aurelia that the CustomElement will parse it's inner content it's self.

Recommendations:

Metadata.handlesContentManually();
Metadata.skipProcessingContent();
@t3hprofit
Copy link

Metadata.skipContentProcessing(); rolls off the tongue a little easier or Metadata.deferContentCompilation(); possibly

@RichiCoder1
Copy link
Author

Defer makes it seem like the engine will still do it at some point. We want complete control with the CustomElement.
Agreed on skipContentProcessing();

@EisenbergEffect
Copy link
Contributor

Use .skipContentProcessing(). You may also want to use this in conjunction with .noView(). It will go out in the next templating release, today or tomorrow.

@RichiCoder1
Copy link
Author

Yay :D

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

No branches or pull requests

3 participants