Skip to content
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

Insert Custom HTML Plugin #858

Open
nozpheratu opened this issue Jan 15, 2013 · 4 comments
Open

Insert Custom HTML Plugin #858

nozpheratu opened this issue Jan 15, 2013 · 4 comments

Comments

@nozpheratu
Copy link

It would be great to have a plugin that allows you to add custom HTML source code, perhaps using the "InsertHTML" command. See https://getsatisfaction.com/aloha_editor/topics/insert_element_button

@evo42
Copy link
Member

evo42 commented Jan 16, 2013

That would be great -- you're invited to write it ;-)
http://aloha-editor.org/blog/2012/12/a-short-guide-on-writing-plug-ins-for-aloha-editor/

If you need any help let us know!

@nozpheratu
Copy link
Author

I did actually begin to write this, but my work was halted due to some licensing conflicts I've been having with my app and Aloha. I'm still interested and contributing however so I'll see if I can find some time over the weekend. I like how the Mercury Editor in particular handles this. They have an HTML editor module that once clicked renders out the editable content as raw HTML inside a textarea. Does Aloha have any methods for returning the HTML that can be used?

@evo42
Copy link
Member

evo42 commented Jan 23, 2013

What licensing conflicts do you have? Maybe we can help out -- you can send a message to rene.kapusta//ät//aloha-editor.org

Yes, you can use .getContents() to get the HTML of an editable (the textarea you would need to add yourself)
Example: https://gist.github.com/1448270#file-aloha-save-js-L6

Activate the dom-to-xhtml plugin to retrieve XHTML content:
http://aloha-editor.org/guides/plugin_dom_to_xhtml.html

Looking forward to your plugin :-)

@aweddy
Copy link

aweddy commented Mar 6, 2013

We have one that we're looking to submit in about a week, it's a simple modal popup that checks against your contentHandler section of your config for the whitelist before inserting... simple, but works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants