Hi Ross!

Nice addition... I am trying to use it but I am getting:
<type 'exceptions.NameError'> global name 'markitup' is not defined Version
web2py™ (2, 3, 2, datetime.datetime(2012, 12, 17, 15, 3, 30), 'stable')
Python Python 2.6.6: /usr/bin/python  Traceback


1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.


Traceback (most recent call last):
  File "/home/titog/Documents/Projetos/web2py/gluon/restricted.py",
line 212, in restricted

    exec ccode in environment
  File 
"/home/titog/Documents/Projetos/web2py/applications/cms/controllers/default.py"
<http://127.0.0.1:8000/admin/default/edit/cms/controllers/default.py>,
line 81, in <module>

  File "/home/titog/Documents/Projetos/web2py/gluon/globals.py", line
193, in <lambda>

    self._caller = lambda f: f()

  File 
"/home/titog/Documents/Projetos/web2py/applications/cms/controllers/default.py"
<http://127.0.0.1:8000/admin/default/edit/cms/controllers/default.py>,
line 22, in index

    form=SQLFORM(db.conteudo,conteudo)

  File "/home/titog/Documents/Projetos/web2py/gluon/sqlhtml.py", line
1063, in __init__

    inp = field.widget(field, default)

  File "applications/cms/modules/plugin_markitup/markitup.py", line
131, in widget

    return markitup(value, **attributes)
NameError: global name 'markitup' is not defined


Are you able to sent the plugin package? Maybe I missed something copying
it from source...



On Mon, Feb 13, 2012 at 11:20 AM, Marin Pranjić <marin.pran...@gmail.com>wrote:

> Thanks, i will test by the end of the week.
> I need this.
>
> Marin
>
>
> On Sun, Feb 12, 2012 at 10:07 PM, Ross Peoples <ross.peop...@gmail.com>wrote:
>
>> I have created another plugin for the MarkItUp widget. I know that
>> plugin_wiki has this currently, but I wanted a dedicated plugin for this
>> for an upcoming project I'm working on.
>>
>> You can get the plugin from Bitbucket:
>> https://bitbucket.org/PhreeStyle/web2py_markitup
>>
>> There is no documentation yet, as I just pushed the code. But I wanted to
>> announce in case anyone wants to play with this. It has not been thoroughly
>> tested and is only an alpha at this point. It can be used with several
>> different markup languages:
>>
>>    - BBCode
>>    - HTML
>>    - Markdown
>>    - Markmin
>>    - reStructuredText
>>    - Textile
>>    - Wiki
>>
>> The plugin can be used standalone, or as a form field widget. It
>> currently supports live previews for 4 markup languages: html, markmin,
>> markdown, textile, and bbcode. Code blocks for markmin and markdown markup
>> are highlighted by pygments, which is included as part of the plugin. No
>> external dependencies. Using pygments for code highlighting allows over 100
>> languages to be highlighted.
>>
>> Code highlighting in markmin:
>>
>> ``
>> def testing():
>>     print 'Testing'
>> ``:python
>>
>> Code highlighting in markdown:
>>
>>     :::python
>>     def testing():
>>         print 'Testing'
>>
>> Markdown requires four spaces at the beginning of each line for code
>> blocks.
>>
>> Example for basic usage:
>>
>> from plugin_markitup.markitup import MarkItUp
>>
>> def test():
>>     widget = MarkItUp(set_name='markmin').markitup()
>>      return dict(widget=widget)
>>
>>
>> Example model for form fields:
>>
>> from plugin_markitup.markitup import MarkItUp
>>
>> db.define_table('content',
>>     Field('name', length=20),
>>     Field('description', 'text')
>> )
>> db.content.description.widget = MarkItUp().widget
>>
>>
>> Example controller:
>> def test():
>>     form = SQLFORM(db.content)
>>     if form.accepts(request, session):
>>         redirect(URL())
>>
>>     return dict(form=form)
>>
>>
>> This plugin is more of an alpha preview, so I expect there to be problems
>> and inconsistencies. Please try it out and let me know if you have any
>> questions, comments, or problems!
>>
>
>


-- 

Linux User #387870
.........____
.... _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:_______

-- 



Reply via email to