in reply to Has anyone created, or is aware of a Perl editor, for "in page usage"?

JavaScript-based solutions for a client-side editor running within a web browser work because most web browsers have JavaScript engines built-in. Most (sane) ones don't have Perl interpreters built in. While there are Flash plugins, Java plugins, and so on, there's really no Perl plugin for web browsers. If you want client side scripting inside of a browser you generally use JavaScript; it's well suited to the task.


Dave

  • Comment on Re: Has anyone created, or is aware od a Perl editor, for "in page usage"?

Replies are listed 'Best First'.
Re^2: Has anyone created, or is aware od a Perl editor, for "in page usage"?
by taint (Chaplain) on Dec 02, 2013 at 04:19 UTC
    Thanks for the reply, davido

    This is all understood. My thought's were to accomplish this through the use of Perl. All of this became possible early on with Netscape/Mozilla's "designMode", and IE's "contentEditable" document tag. While both browsers support JavaScript, and currently posses internal JS engines. JavaScript is not a requirement to implement an "Editable" web page. Don't get me wrong. I am not attempting to be argumentative. But I recognize that JavaScript is not a prerequisite for making a web page editable within a browser, that's all.

    As such, I'm trying to imagine why I couldn't/shouldn't simply create a Perl Module that accommodates these browser features. Nothing fancy, just a basic editor. Seems like it'd be fairly handy. Costs the web client less resources that most, if not all the current JS based editors currently in use today.

    Best wishes, and thanks again for the response, davido

    --Chris

    Some related information
    Rich Text Editing
    Content Editable
    Midas

    #!/usr/bin/perl -Tw
    use Perl::Always or die;
    my $perl_version = (5.12.5);
    print $perl_version;

      "All of this became possible early on with Netscape/Mozilla's "designMode", and IE's "contentEditable" document tag."

      The contenteditable attribute (not tag) does exist, but it's not especially useful on its own. It allows you to place a caret into an HTML element and start typing. It doesn't allow you to insert new HTML elements though (such as <b> or <ul>), and doesn't allow you to "do" anything with the text you've typed (such as submit it in a form).

      To do anything else you'll need to use a scripting language which runs within the browser.

      In pre-11 Microsoft Internet Explorers you may be able to persuade the browser to run Perl scripts if ActiveState PerlScript is installed on the client machine. For any other browser, you're out of luck - Javascript is the only scripting language they support.

      use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
        Understood, tobyink, and my apologies for not having better articulated my thoughts/concept.

        I'll wait till I have experimented with the concept I am envisioning, before elaborating further.

        Thanks for your thoughtful response, tobyink

        --Chris

        #!/usr/bin/perl -Tw
        use Perl::Always or die;
        my $perl_version = (5.12.5);
        print $perl_version;