Page 4 of 4 FirstFirst ... 234
Results 31 to 38 of 38

Thread: Ext.ux.form.plugin.HtmlEditor

  1. #31
    Sencha Premium User lorezyra's Avatar
    Join Date
    Dec 2007
    Location
    Japan -- 千葉
    Posts
    666

    Default

    I see...


    If I understand you correctly, you are not wanting to use the default HtmlEditor component. I have made overrides in the past and simply kept them in the HTML file that loads all the JS resource files.

    However, since SA2, you can now include your own library files!

    The way I see it, either override the component at the time of the application launch (not controller init) or after the ext.js file has loaded ( but before app.launch() )...


    I would try creating a new library file in SA and use something like this:
    PHP Code:
    /////////////////////////////////////////////////////////////////////////////////  */
    var xVer= new Ext.Version(Ext.getVersion().version);
    if (
    xVer.isLessThan('4.1')) { //only overRide if ExtJs.version < 4.1
        
    if (Ext.isGecko) { console.warn('Patching ExtJS 4.x Ext...'); }


    /* ********************************************\

    // PUT your override codes here.

    / *********************************************/



    }//end if EXT<4.1
    delete xVer//don't need this var after processing

    if(debug){
        
    /* http://www.sencha.com/forum/showthread.php?158122-Call-Controller-Method-from-outside-Ext-namespace&highlight=tab+panel+activate
        */
        
    var App;
        function 
    App(){
            var 
    app;
            
    this.fireEvent = function(evt,opts){
                
    app.fireEvent(evtopts);
            }
            
    this.setApp = function(a){
                
    app a;
            }
        }
    //end function App    
    }//end if debug



    // Later, start the app... 
    Perfection as a goal is a nice idea that can point one in a specific direction. However, since "perfection" is an ever changing (evolving?) and moving target, one must admit that perfection can never be obtained...

    When in doubt, check the d4mn source code!
    ================================================
    And here are my terms...

    1. I don't care if you use my source code. (Known as "Code.")
    2. I don't care if I get any monetary compensation.
    3. I do care to receive credit for Code provided. So, please keep my name in the comments for Code provided.
    4. Code is provided without warranty "AS-IS" and I claim absolutely no warranty nor liability to the quality, security, and run-ability on any platform.
    5. By using Code, you accept all risk inherit with Code regardless if Code has known and yet to be discovered bugs.
    6. You are welcome to change and improve the Code to best meet your needs.
    7. I don't care if you use the Code in a commercial or open-source project.
    8. You are not required to contact me prior to using the Code.

    ================================================
    Simple. Enjoy.

  2. #32
    Sencha User
    Join Date
    Jul 2009
    Posts
    1

    Default Using this in Architect 2.2

    I would also love to be able use this plugin in an Architect project. I've investigated the "createAlias" approach but it appears that only works with extending components, not adding plugins. I haven't attempted overriding the editor due to other posts mentioning problems with that approach.

    It would be great if someone from Sencha could comment on when/if this functionality might be available in SA, or alternatively, the correct way to load the plugin.

    Cheers,
    Michael

  3. #33
    Sencha Premium User lorezyra's Avatar
    Join Date
    Dec 2007
    Location
    Japan -- 千葉
    Posts
    666

    Default

    Try adding a lib file in SA...

    As I suggested above, include your overrides as through you would in a separate js file.

    The lib files would show up under the "Resource" node in the proj.Inspector.
    Perfection as a goal is a nice idea that can point one in a specific direction. However, since "perfection" is an ever changing (evolving?) and moving target, one must admit that perfection can never be obtained...

    When in doubt, check the d4mn source code!
    ================================================
    And here are my terms...

    1. I don't care if you use my source code. (Known as "Code.")
    2. I don't care if I get any monetary compensation.
    3. I do care to receive credit for Code provided. So, please keep my name in the comments for Code provided.
    4. Code is provided without warranty "AS-IS" and I claim absolutely no warranty nor liability to the quality, security, and run-ability on any platform.
    5. By using Code, you accept all risk inherit with Code regardless if Code has known and yet to be discovered bugs.
    6. You are welcome to change and improve the Code to best meet your needs.
    7. I don't care if you use the Code in a commercial or open-source project.
    8. You are not required to contact me prior to using the Code.

    ================================================
    Simple. Enjoy.

  4. #34
    Sencha User murrah's Avatar
    Join Date
    Oct 2007
    Location
    Katoomba, Blue Mountains, west of Sydney, Australia
    Posts
    400

    Default

    Hi. Thanks for your plugin - really useful for me.

    I discovered that if you attempt to plug it into a htmleditor that is not visible at the time of initialisation, it does not render the extra toolbar (and that then causes a subsequent problem - see below).

    Details:
    I have a htmleditor on a form on a tab panel that is rendered "behind the scenes" ie the form is set up and data is loaded to it but the user cannot see it until they click a menu button. Without the plugin there is no problem and when you view the form everything is ok including the htmleditor and it's field data.

    However, when you add the plugin (with enableAll: true, enableMultipleToolbars: true) it fails to render the extra toolbar buttons and (in the case of FireFox) throws an error here:
    PHP Code:
    btns[name].toggle(doc.queryCommandState(name)); 
    where you are toggling the buttons. The problem is that the buttons are not actually there.

    After much debugging I can not work out why the htmleditor's toolbar is present but the plugin's toolbar is not.

    The workaround was to add the form panel containing the plugin to the tab panel only once the user clicks the menu button. ie use onActivate on the tab panel.

    Anyway FYI.

    Thanks again,
    Murray

  5. #35
    Sencha User
    Join Date
    Jul 2008
    Location
    Czech republic
    Posts
    69

    Default

    Hello,
    I'd like to use this plugin, but I can not get it works with ExtJS 4.2.1 in multiple toolbars mode. HTML editor than looks like this (new toolbar is not created and all plugins buttons are displayed over the origin ones).
    htmleditor.PNG
    Does anyone have any suggestion how to fix it?

  6. #36
    Sencha User murrah's Avatar
    Join Date
    Oct 2007
    Location
    Katoomba, Blue Mountains, west of Sydney, Australia
    Posts
    400

    Default

    Quote Originally Posted by ondra.cz View Post
    HTML editor than looks like this (new toolbar is not created and all plugins buttons are displayed over the origin ones).
    I had the same problem and was not able to fix it. It is something to do with the way the extra toolbar is injected into the dom. I did manage to get it sort of working by adding the toolbar to the HTMLEditor field in the normal way ( items.add() ) rather than directly adding to the dom and then adjusting the heights of the iframe to get scrolling working correctly, but found that a resize undid the changes! Beyond me.

    Then I discovered this component and am happily using it instead:
    http://www.sencha.com/forum/showthre...YSIWYG-Editor.

    Good luck,
    Murray

  7. #37
    Sencha User
    Join Date
    Jul 2008
    Location
    Czech republic
    Posts
    69

    Default

    Last version works fine with ExtJS 4.2.3 - https://github.com/ateodorescu/mzExt.

    There is still few issues:
    1. when height of editor is set or editor is resizable and enableMultipleToolbars is set to true, height of iframe is no recalculated right (height of new toolbar is not respected)
    2. when you have editor rendered on inactive tab, than toolbar is displayed with folded icons

  8. #38
    Sencha User
    Join Date
    Mar 2014
    Location
    Hyderabad
    Posts
    1

    Default not able to use Table(), HR() plugins provided

    first of all thanks for the plugins provided. I tried all the possible ways to use given plugins but failed to use.

    i am using extjs 6 and building my source (.js) using sencha cmd.

    please help me in below

    1. where exactly i should place the plugin js files (Ext.ux.form.HtmlEditor.Table.js)
    2. how to use them in my js file( is this just add in pulgins: [Ext.ux.form.HtmlEditor.Table.js()] should do or anything else i should add in my code so that i can see the table icon in my htmleditor

    working fiddle will save lot of time and really helpful for many folks like me

    Thanks for helping me

    Regards
    Motilal

Page 4 of 4 FirstFirst ... 234

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •