1. #1
    Sencha User
    Join Date
    Feb 2012
    Location
    Copenhagen
    Posts
    30
    Vote Rating
    0
    Igor.Szyporyn is on a distinguished road

      0  

    Default Ext.ux.markdown.Panel

    Ext.ux.markdown.Panel


    A markdown Text Editor

    Simple extension of a panel that will provide the user with a markdown panel which can export the value to both HTML and to Markdown

    Screen shot 2013-12-13 at 3.06.57 PM.png

    Download: markdownpanel on github

    Note! Requires two other extensions of mine
    Ext.ux.util.Dependencies
    Ext.ux.util.IsReady

    (the IsReady one is silly, but have not had time to remove it and put something else in its place, so live with it)

    Note! Remember to update the path to the dependent files in Panel.js

    Configure options and defaults:

    config: "controlTags"
    default value: ["h1", "h2","h3", "bold", "italic", "link", "quote", "code", "image", "olist", "ulist", "sup", "hr"]
    description: Available controls for the toolbar

    config: "controlTips"
    default value: true
    description: Determine if toolbar tips should be shown or not

    config: "outputValue"
    default value: "markdown"
    description: the type of output from the markdown panel - either "markdown" or "html" (by getValue)

    config: stylesPath
    default value: "ux/markdown/styles/defaults.css"
    description: Default styles for the previewer

    config: textarea
    default value: null
    description: Configuration for the textarea component (ext configs)

    Methods

    getEditor() returns the markdown editor object
    getTextarea() returns the extjs texarea
    getToolbar() returns the toolbar
    getValue() returns the value (HTML or markdown based on the "outputValue" config option

    setControls() takes an array as argument and then sets the controls in the toolbar
    setValue() takes a string as argument and adds it to the editor ("inputValue" config option determines what the component wants as input)

    toHtml() returns the value as HTML
    toMarkdown() return the value as Markdown
    Attached Images
    Last edited by Igor.Szyporyn; 17 Dec 2013 at 11:38 AM. Reason: Changed link to github

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,623
    Vote Rating
    397
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      1  

    Default


    Thank you for the contribution.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Location
    Copenhagen
    Posts
    30
    Vote Rating
    0
    Igor.Szyporyn is on a distinguished road

      0  

    Default


    Gonna re-do this whole thread in a little while and link to the demo page instead.

    NOTE! You have to go to the Panel.js file and adjust the references to where we are at in dependencies

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Location
    Copenhagen
    Posts
    30
    Vote Rating
    0
    Igor.Szyporyn is on a distinguished road

      0  

    Default


    Ohh BTW

    I am not at all protective about the "namespace" in which they lie so to say (not that I own it or anything lol, don't rightly know how to put it - so hope you guys get my meaning)

    If anyone out there is thinking - hmm maybe this namespace Ext.ux.markdown could use a Ext.ux.markdown.Window, then go for it - and I will add that file to the "package" as well if that person would allow me

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Location
    Copenhagen
    Posts
    30
    Vote Rating
    0
    Igor.Szyporyn is on a distinguished road

      0  

    Default


    UPDATE: toolbar size was wrong - some CSS was making it ok where I was developing it :-)

    Go download if you already did or go to the Panel.js file and change toolbar height to 32

  6. #6
    Sencha User
    Join Date
    Feb 2012
    Location
    Copenhagen
    Posts
    30
    Vote Rating
    0
    Igor.Szyporyn is on a distinguished road

      0  

    Default


    UPDATE: Is now on github instead
    UPDATE: Problem with margin on the textarea, as well as some border and looks problems fixed
    UPDATE: Added "controlTips" option in config
    UPDATE: Previewer now works again with scrollbar

Thread Participants: 1

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