Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

how to install

OlivawOlivaw New
edited October 2012 in Vanilla 2.0 - 2.8

Ciao and thank you for your work.
My question is: to use the plugin just disable CLEditor jQuery WYSIWYG? I tried to do it but does not work.
Thank you for your instructions.

«1

Comments

  • KasperKasper Scholar of the Bits Copenhagen Vanilla Staff

    Heya,

    Just disable any other active WYSIWYG plugins and activate Wysihtml5.

    // Kasper

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • frippzfrippz New
    edited October 2012

    I must be missing something, since the editor doesn't show up. Should I set $Configuration['Garden']['InputFormatter'] in config.php?

  • KasperKasper Scholar of the Bits Copenhagen Vanilla Staff

    Nopes, just activate the plugin and you should be good to go. If it doesn't work out like it's supposed to, drop me a link and I'll check it out tomorrow.

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • This looks like a perfect plugin for me, but I too cannot seem to install it. I'm able to successfully enable it, however it does not appear in any text area.

    Is it compatible with version 2.0.18.4?

    Thanks @kasperisager!

  • KasperKasper Scholar of the Bits Copenhagen Vanilla Staff
    edited October 2012

    Shoot, Gdn_Form_BeforeBodyBox_Handler() doesn't exist in the 2.0-branch so it only works with the 2.1-branch.

    Edit: Just uploaded a new version with the requirement added.

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • fh111fh111 Vanilla Padawan ✭✭

    hm..it still does not show up for me on a 2.0.18.4 installation

    anyone else getting it to work?

  • KasperKasper Scholar of the Bits Copenhagen Vanilla Staff
    edited October 2012

    @fh111 said:

    hm..it still does not show up for me on a 2.0.18.4 installation

    anyone else getting it to work?

    I said:

    Shoot, Gdn_Form_BeforeBodyBox_Handler() doesn't exist in the 2.0-branch so it only works with the 2.1-branch.

    Answer + quote = Quonswer?

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • fh111fh111 Vanilla Padawan ✭✭

    Oops I misunderstood. I thought you uploaded a new version that supports 2.0-branch

  • KasperKasper Scholar of the Bits Copenhagen Vanilla Staff

    @fh111 said:
    Oops I misunderstood. I thought you uploaded a new version that supports 2.0-branch

    Oh! I see now that my post may have been misleading. I did upload a new version, but with the 2.1 requirements added so that it can't be used with 2.0.

    By the way, if you want to use it with 2.0 you can alter the code to resemble that of CLEditor. You'll probably need to define the stuff within the public Gdn_Form_BeforeBodyBox_Handler() function in a private function instead though to save some copy/pasting.

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • It is realy awsome plugin that swits best of all with bootstrap theme, but I can't state te logic, why to create a plugin for an unrelised version(2.1) when there are so many unskilled* users that need a release for uptodate version (2.0.18.4) , l personaly handled this code in all posible ways but it still doesn't work on my forum. So, if somebody found a solution, share it with us* please! Thanks in advance! P.S.No offense Kaspe, your plugin is realy cool but as said one Moldavian saing'' You have a good meal but don't know when to serve it'' . H ave a nice day!

  • KasperKasper Scholar of the Bits Copenhagen Vanilla Staff

    Open default.php found in CLEditor and take a look at how it handles adding the editor. You'll find one simple difference between Wysihtml5 and CLEditor; the latter hooks two events available in 2.0 while the former hooks one event only available in 2.1. Simply rewrite Wysihtml5 so that this hook...

    public function Gdn_Form_BeforeBodyBox_Handler($Sender) {
        // Whatever
    }
    

    ...becomes these two hooks:

    public function PostController_Render_Before($Sender) 
        // Whatever
    }
    
    public function DiscussionController_Render_Before($Sender) {
        // Whatever
    }
    

    Why haven't I done this myself so that 2.0 users can enjoy the plugin as much as I do? Because I'm lazy as f*** and therefore chose to use the new and improved Gdn_Form_BeforeBodyBox_Handler() event which is fired on all pages with text boxes. Easy peasy :-)

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • Still don't work, though thatnks!

  • KasperKasper Scholar of the Bits Copenhagen Vanilla Staff

    Well, what did you do? If done correctly, it will work.

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • So, its what I did (I replaced 1 line and added 2) . Thanks that are patient and help me!

  • peregrineperegrine MVP
    edited January 2013

    @sandernik

    at the very least the code you posted is wrong for 2.0.18.4

    • you are requiring version 2.1
    • you've wrapped the 2 functions incorrectly.
    • I suspect you need more than those changes to make the plugin work in 2.0.18.4

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine said:
    sandernik

    at the very least the code you posted is wrong for 2.0.18.4

    • you are requiring version 2.1
    • you've wrapped the 2 functions incorrectly.
    • I suspect you need more than those changes to make the plugin work in 2.0.18.4

    May be, I'm ''turn of the light'' in coding at all and because of it asked for help here.

  • @peregrine said:
    sandernik

    at the very least the code you posted is wrong for 2.0.18.4

    • you are requiring version 2.1
    • you've wrapped the 2 functions incorrectly.
    • I suspect you need more than those changes to make the plugin work in 2.0.18.4

    May be, I'm ''turn of the light'' in coding at all and because of it asked for help here.

  • peregrineperegrine MVP
    edited January 2013

    @sandernik

    @peregrine said

    I suspect you need more than those changes to make the plugin work in 2.0.18.4

    Sorry, I'm not pursuing it - it works fine in 2.1

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited January 2013

    @sandernik commented again

    @peregrine said

    I suspect you need more than those changes to make the plugin work in 2.0.18.4

    Besides the event changes. there are calls to setvalue and getvalue (remove the sender->) that need to be changed and then there is a js change that needs to be fixed undefined. so you see.

    @sandernik said

    Moldavian saing'' You have a good meal but don't know when to serve it'' .

    "Think of it as a dessert best served with vanilla 2.1, when the main course vanilla 2.1 is served"

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

This discussion has been closed.