GithubHelp home page GithubHelp logo

goravbhootra / scrivener_html Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mgwidmann/scrivener_html

3.0 3.0 2.0 197 KB

HTML view helpers for Scrivener

License: MIT License

Elixir 100.00%

scrivener_html's People

Contributors

agenestar avatar andrewbredow avatar britto avatar cc3c avatar drapergeek avatar ericsullivan avatar hadrianpaulo avatar hl avatar hzeus avatar jaimeiniesta avatar jerodsanto avatar jwarlander avatar kenta-aktsk avatar lee-dohm avatar mamantoha avatar manukall avatar martinmaillard avatar martinos avatar mcrumm avatar mgwidmann avatar minibikini avatar mylanconnolly avatar ndbroadbent avatar phereford avatar sebastian avatar sgoettschkes avatar shulhi avatar smeevil avatar taj avatar victorsolis avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

scrivener_html's Issues

Issue on customizing output

Hey!

First of all, thank you for the work on this fork :)

I have observed an issue when trying to use HEEX templates for custom outputs. For example, previously to HEEX templates, we have something similar to this:

<%= pagination_links @conn, @page, previous: ~E(<i class="material-icons">chevron_left</i>), next: ~E(<i class="material-icons">chevron_right</i>) %>

After the update to the HEEX templates, for live view 0.16, if we keep using the ~E sigil, we received this warning:

Phoenix.HTML.sigil_E/2 is deprecated. use the ~H sigil instead

So we could change the sigil being injected from ~E to ~H, something like:

<%= pagination_links @conn, @page, previous: ~H(<i class="material-icons">chevron_left</i>), next: ~H(<i class="material-icons">chevron_right</i>) %>

But this triggers this runtime error when trying to render that page:

[error] #PID<0.1160.0> running Endpoint (connection #PID<0.1145.0>, stream id 4) terminated
Server: localhost:4000 (http)
Request: GET /teams
** (exit) an exception was raised:
    ** (Protocol.UndefinedError) protocol String.Chars not implemented for %Phoenix.LiveView.Rendered{dynamic: #Function<4.11083071
7/1 in Web.View."index.html"/1>, fingerprint: 64633340573066879469609956275831373914, root: true, static: ["<i class
=\"fa fa-caret-right\"></i>"]} of type Phoenix.LiveView.Rendered (a struct). This protocol is implemented for the following type(s)
: Atom, BitString, Date, DateTime, Decimal, Float, Integer, List, MyXQL.Query, MyXQL.TextQuery, NaiveDateTime, Phoenix.LiveComponen
t.CID, Postgrex.Copy, Postgrex.Query, Time, URI, Version, Version.Requirement
        (elixir 1.13.1) lib/string/chars.ex:3: String.Chars.impl_for!/1
        (elixir 1.13.1) lib/string/chars.ex:22: String.Chars.to_string/1
        (scrivener_html 1.8.1) lib/scrivener/html.ex:603: Scrivener.HTML.safe/1
        (scrivener_html 1.8.1) lib/scrivener/html.ex:341: Scrivener.HTML.page/3
        (elixir 1.13.1) lib/enum.ex:1593: Enum."-map/2-lists^map/1-0-"/2
        (elixir 1.13.1) lib/enum.ex:1593: Enum."-map/2-lists^map/1-0-"/2
        (scrivener_html 1.8.1) lib/scrivener/html.ex:210: Scrivener.HTML._pagination_links/3
...
...

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.