Closed chipairon closed 11 years ago
I have decided to take a non-obtrusive approach... but feels hacky:
$(document).ready(function() {
// customize wysihtml5 editor
try {
window.AA.editor_config.parserRules['tags']['iframe'] = {
remove: 0,
check_attributes: {
src: 'url',
width: 'numbers',
height: 'numbers'
}
}
}catch(e) {}
}
I'd like to eventually move the parser rules into the config as a hash, then just .to_json
it in the javascript, that way you could do:
ActiveAdmin::Editor.configure do |config|
config.parser_rules['tags']['iframe'] = {
remove: 0,
check_attributes: {
src: 'url',
width: 'numbers',
height: 'numbers'
}
}
end
Added in #28 and released a new gem (1.1.0).
Hello,
I want to be able to emmed youtube videos using the iframe youtube provides, but in app/assets/javascripts/active_admin/editor/parser_rules.js, the iframe tag is set to 'remove=1'
If I understand it correctly, I need to make a fork of your project just to change that rule and possibly getting out of sync :( (If there is another way to insert videos, plese tell me)
I think it would be a great addition to be able to modify the tags section of the parser via the initializer used to set S3 options.
Could you enlighten me a bit about this issue, please?
Thanks