omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. manuguerra

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 15
    • Best 0
    • Controversial 0
    • Groups 0

    manuguerra

    @manuguerra

    0
    Reputation
    810
    Profile views
    15
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    manuguerra Unfollow Follow

    Latest posts made by manuguerra

    • JavaScript: Retrieve the text in a textarea

      Hello,
      I am using a workflow in Editorial to generate and preview html code.
      In my code, I have a textarea (embedded in two div, if this matters) and I need to get the text of the textarea when the user "clicks" on a specific button.
      In JavaScript this is usually done with document.getElementById(obj).value, but this does not work in Editorial. I have tried also innerHTML, and as expected it does not work as well.
      In the same script, I can successfully use document.getElementById(obj).style.display or document.getElementById(obj).name, so the problem is in "value".

      Any hints? Any way to get the textarea content?

      Thanks,
      Maurizio

      posted in Editorial
      manuguerra
      manuguerra
    • RE: JavaScript: Retrieve the text in a textarea

      Thanks JonB,
      this has solved the problem.
      Cheers

      posted in Editorial
      manuguerra
      manuguerra
    • RE: JavaScript: Retrieve the text in a textarea

      I found the problem and in fact document.getElementById(obj).value works as it should.
      I am getting an empty result because in the textarea there is markdown code with a leading "#", and everything after the hash is not captured.

      Can anyone help with this?

      posted in Editorial
      manuguerra
      manuguerra
    • Import newer version of built-in module

      Newbie question:
      The current version of Pythonista (1.5) comes with Sympy 0.7.4.1, but I need version 0.7.5.
      I have downloaded the newest version of the module using the script installsympy at https://gist.github.com/henryiii/9011826 and I can see a sympy folder in Pythonista.

      How can I import the newest version?
      "import sympy" imports the builtin version, and renaming the folder to something like sympy2 and then importing it gives me conflict errors.

      What is the right way to do this? absolute_import?

      Thanks

      Update:

      If I try:

      from . import sympy
      

      I get:

      Traceback (most recent call last):
      File "<string>", line 1, in <module>
      ValueError: Attempted relative import in non-package
      
      posted in Pythonista
      manuguerra
      manuguerra
    • RE: Import newer version of built-in module

      Thanks that worked!

      posted in Pythonista
      manuguerra
      manuguerra
    • RE: Import newer version of built-in module

      Thanks for the reply JonB.
      Using sys.path.append does not solve the problem.
      Honestly I am a bit in the dark (i.e. am a complete newbie), so I run sys.path.append('.'), sys.path.append('..') and sys.path.append('sympy'), not knowing which one was the right one (and killing Pythonista each time to stay on the safe side).
      In all cases,

      import sympy
      sympy.__version__
      

      gave 0.7.4.1
      What am I doing wrong?

      posted in Pythonista
      manuguerra
      manuguerra
    • RE: Transfer Editorial snippets and workflows between iPad and iPhone

      It should work. Be sure to manually download the workload backup files tapping on them. By default they are not downloaded, and are in fact grey, not black.

      posted in Editorial
      manuguerra
      manuguerra
    • Scroll to the end of a textview

      I have not been able to find this information, sorry if it has already been answered.
      Is there a way to programmatically scroll at the end of a textview? I know how to do that for a webview, but have no clue for a textview.
      Thanks

      posted in Editorial
      manuguerra
      manuguerra
    • RE: Scroll to the end of a textview

      If "html" is the html code to show:

      htmlshow='<body onload="window.scrollTo(0, document.body.scrollHeight);">'+html+'</body>'
      v['webview1'].load_html(htmlshow)
      
      posted in Editorial
      manuguerra
      manuguerra
    • RE: Scholarly writing with Editorial

      Hi @mcburton,

      Thanks for your bibtex workflow, I happily use it with Papers 3 for iOS (which can now export bib files).
      It is part of my academic writing together with my md->html_tex workflow. If interested, my workflow is able to create html and tex files taking care of local and remote images, tables, formulas, etc.
      The html file can then be opened in another app or uploaded to a web service (e.g. for students or collaborators), while the tex project is zipped with the images and can be then be imported in TexPad or TexWriter.
      Both papers and presentations are supported. For presentations, deck is required (either locally or on the remote server) for html files and beamer is used for tex files.

      Cheers

      posted in Editorial
      manuguerra
      manuguerra