https://avo.cool logo
Join Discord
Powered by
# avo-2
  • d

    delightful-sugar-45580

    04/14/2021, 4:34 PM
    my resource
  • l

    lemon-wall-20836

    04/14/2021, 4:34 PM
    I think it's the content that makes it look like that
  • d

    delightful-sugar-45580

    04/14/2021, 4:34 PM
    humn, let me check
  • l

    lemon-wall-20836

    04/14/2021, 4:34 PM
    it's still something that needs to be fixed, but I can't replicate it
  • l

    lemon-wall-20836

    04/14/2021, 4:35 PM
    maybe around the area
    placeholder="Content"
  • d

    delightful-sugar-45580

    04/14/2021, 4:35 PM
    nops
  • d

    delightful-sugar-45580

    04/14/2021, 4:35 PM
    i create a new post and same thing
  • l

    lemon-wall-20836

    04/14/2021, 4:35 PM
    ok
  • l

    lemon-wall-20836

    04/14/2021, 4:35 PM
    hmm
  • l

    lemon-wall-20836

    04/14/2021, 4:35 PM
    that's weird
  • d

    delightful-sugar-45580

    04/14/2021, 4:35 PM
  • l

    lemon-wall-20836

    04/14/2021, 4:36 PM
    https://avodemo.herokuapp.com/avo/resources/posts/41/edit
  • l

    lemon-wall-20836

    04/14/2021, 4:36 PM
    I created this post now and the trix field looks ok
  • d

    delightful-sugar-45580

    04/14/2021, 4:39 PM
    Copy code
    <trix-editor input="trix_article post_content" value="<div class="trix-content">
      <div>Test</div>
    </div>
    " placeholder="Content"><div class="trix-content">
      <div>Test</div>
    </div>
    </trix-editor>
  • d

    delightful-sugar-45580

    04/14/2021, 4:39 PM
    this is the problem
  • l

    lemon-wall-20836

    04/14/2021, 4:42 PM
    is that from Avo source code?
  • l

    lemon-wall-20836

    04/14/2021, 4:42 PM
    that content should be escaped AFAIK
  • d

    delightful-sugar-45580

    04/14/2021, 4:43 PM
    from avo html response for this page
  • d

    delightful-sugar-45580

    04/14/2021, 4:44 PM
    https://github.com/avo-hq/avo/blob/master/app/components/avo/edit/fields/trix_field_component.html.erb
  • d

    delightful-sugar-45580

    04/14/2021, 4:44 PM
    im new with trix but the value dont can be passed as tag content?
  • d

    delightful-sugar-45580

    04/14/2021, 4:45 PM
    <trix-editor input="<%= trix_id %>" value="<%= @field.value %>" placeholder="<%= @field.placeholder %>"><%== @field.value %></trix-editor>
  • d

    delightful-sugar-45580

    04/14/2021, 4:45 PM
    the are passed as content tag and as value param
  • l

    lemon-wall-20836

    04/14/2021, 4:45 PM
    value="<%= @field.value %>"
    should escape the HTML
  • l

    lemon-wall-20836

    04/14/2021, 4:45 PM
    ok. let me see if I can remove the
    value
    attribute
  • l

    lemon-wall-20836

    04/14/2021, 4:47 PM
    https://github.com/avo-hq/avo/pull/356
  • l

    lemon-wall-20836

    04/14/2021, 4:47 PM
    waiting for the checks to pass and merging it
  • d

    delightful-sugar-45580

    04/14/2021, 4:56 PM
    im looking into trix doc, and the content shold be passed using an input field.
  • d

    delightful-sugar-45580

    04/14/2021, 4:57 PM
    https://github.com/basecamp/trix#populating-with-stored-content
  • l

    lemon-wall-20836

    04/14/2021, 4:58 PM
    yeah, that was the initial implementation
  • l

    lemon-wall-20836

    04/14/2021, 4:58 PM
    there was an issue on page refreshes. the content would not show up
1...456...64Latest