bergie / hallo

Simple rich text editor (contentEditable) for jQuery UI

Home Page:http://hallojs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with cite tag and hallo.js

SalahAdDin opened this issue · comments

Hi guys, how are you?

I'm working with wagtail and i try make a custom hallo plugin, it's: https://gist.github.com/SalahAdDin/347e4fab78a64eaadd5c

Works fine for the first two bottons, but i have a problem with cite and i need two features:
First, i want that if i click in the same botton for second time, it undo his function, i mean, that if i do click in a bloquote for second time, delete de blockquote html tag, Am I to understand? In addition, when we use bad something buttons they put wrong tags, trash tags, i don't know if a problem with my custom buttons, but i see it. I think that a delete html format button will be great.

And, well, i have a big problem with cite button, in the editor i can see the cite tag, but, in the front end page don't appear the tag, can anyone help me?

If you can see here, put the cite tag:
problemashallo

And now, well, we haven't a cite :'(
problemahallonosirve

Ok, i fix the cite bug putting the cite tag in whitelister_element_rules().

@hooks.register('construct_whitelister_element_rules')
def whitelister_element_rules():
    return {
        'a': attribute_rule({'href': check_url, 'target': True}),
        'blockquote': attribute_rule({'class': True}),
        'cite': attribute_rule({'class': True}),
    }

@SalahAdDin how to make the icon appear in richtext field on wgatail.?

You have to include in the script.