-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WYSIWYG editor #1
Comments
I'm all for the ACE editor (includes reST highlighting for example). The WYG part can be done using the compiler backend (slow but should performe better for incremental compilers ;-)? edit: it does not include reST by default, but it can use TextMate syntax highlighting bundles. |
nice.
|
Another point against a JS live preview: Markdown extensions, engine specific, non-standard extensions (at least for Pelican, Nikola and Acrylamid) that will either not render or cause syntax errors. I guess one can circumvent the markdown extension issue by using an editor that provides "MultiMarkdown" but there might be still certain edge cases that are differently handled. But on the other hand, full re-compilation is not a realtime preview, hence I suggest to offer a |
good point ;)
|
Not sure whether I can provide a API directly in Acrylamid but I have already done this for a small utility I use to convert a post to HTML and then back to real plain text (for Language Tool): from functools import partial
from acrylamid import core, readers, filters
env = Environment({'options': type('X', (), {'ignore': False})})
conf = core.load("conf.py")
def _render(conf, env, filepath):
filters.initialize([], conf, env)
post = readers.Entry(sys.argv[1], conf)
html = post.source
for item in post.filters + conf.filters:
split = item.split('+')
if split[0].startswith('no'):
continue
fx = filters.get_filters()[split[0]](conf, env, split[0])
html = fx.transform(html, post, *split[1:])
return html
render = partial(conf, env) Not sure if I'll include this into Acrylamid directly as the actual rendering is always delayed but I'm willing to maintain the |
add WYSIWYG features
editing should work without js too.
The text was updated successfully, but these errors were encountered: