1. #1

    Join Date
    Sep 2012
    Posts
    5
    Vote Rating
    0
    ctantalo is on a distinguished road

      0  

    Default Unanswered: Display HTML from database in panel or textarea or text or something!

    Unanswered: Display HTML from database in panel or textarea or text or something!


    I have something that I think would be very simple and easy to implement, but everything I have tried.. falls short.

    My model and store work fine, returning data, etc. One field in my model is type String, and contains HTML text.
    When it is displayed in my panel, which just houses one TEXTAREA, the tags and such are there.

    How do I display this as just HTML? I have tried functions to do an encode, but either I have syntax wrong, or this cant be simply done.

    BTW< it doesnt have to be a textarea, but can be a panel, or whatever to make this work.

    Ext.create('Ext.form.Panel', {
    height: 500,
    columnWidth: .6,
    bodyPadding: 10,
    defaults: {
    anchor: '100%',
    labelWidth: 100
    },
    items :[

    {
    xtype :'textareafield',
    name: 'testProcDesc',
    fieldLabel: 'Description',
    height: 300,
    readOnly: true
    }

  2. #2
    Touch Premium Member suzuki1100nz's Avatar
    Join Date
    Apr 2011
    Location
    New Zealand
    Posts
    433
    Answers
    21
    Vote Rating
    37
    suzuki1100nz has a spectacular aura about suzuki1100nz has a spectacular aura about suzuki1100nz has a spectacular aura about

      0  

    Default


    Just set the html config on the panel - it will be added to the body of the panel

  3. #3

    Join Date
    Sep 2012
    Posts
    5
    Vote Rating
    0
    ctantalo is on a distinguished road

      0  

    Default societies ogayste

    societies ogayste


    if you are talkiing about adding
    HTML: true,

    I already tried that to no success

  4. #4
    Touch Premium Member suzuki1100nz's Avatar
    Join Date
    Apr 2011
    Location
    New Zealand
    Posts
    433
    Answers
    21
    Vote Rating
    37
    suzuki1100nz has a spectacular aura about suzuki1100nz has a spectacular aura about suzuki1100nz has a spectacular aura about

      0  

    Default


    Hi,
    Have a look at the API - http://docs.sencha.com/ext-js/4-1/#!/api/Ext.Component-cfg-html

    There is an html config defined on AbstractComponent and available to all subclasses.
    It takes a string or an object.

    e.g.
    Code:
    {
      xtype : 'container',
      html : '<h1><b> I am an html string</b></h1>'
    }
    You could set this config from your datastore or use a custom renderer - XTemplate

    http://docs.sencha.com/ext-js/4-1/#!/api/Ext.XTemplate

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar