Comments (5)
You should be able to get around this by adding some hooks to your js that initializes the html editor:
$('.html_editor').editor(window.AA.editor_config)
from active_admin_editor.
Hey,
Thanks for the quick reply. I added it to active_admin.js but doesn't seem to have any effect. Wrong file?
from active_admin_editor.
You're adding DOM elements dynamically. You need to attach the editor to
these elements once they've been created. The above code is what you need
to run to attach the editor, but you'll need to make sure it gets called
after the DOM elements are created.
On Monday, April 8, 2013, Patrick Bartels wrote:
Hey,
Thanks for the quick reply. I added it to active_admin.js but doesn't seem
to have any effect. Wrong file?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/30#issuecomment-16059048
.
from active_admin_editor.
When I re-run
$('.html_editor').editor(window.AA.editor_config)
it breaks somewhere in JQuery UI's $.widget.bridge
: https://github.com/jquery/jquery-ui/blob/1-10-stable/ui/jquery.ui.widget.js#L200.
It tries to call the method option
on an instance of Editor
, but there isn't.
Also, JQuery UI 1.10.x expects an object responding to _init
, returned by option
, while JQuery UI master just expects option
on the instance.
Hope I was clear.
/cc @ingo86
from active_admin_editor.
I'm struggling with this too. After the page loads, if I type $('.html_editor').editor(window.AA.editor_config)
into the console, I get TypeError: instance.option is not a function
Individually, window.AA.editor_config
returns an object and $('.html_editor').editor
returns a function.
from active_admin_editor.
Related Issues (20)
- embedding video HOT 4
- Image at center
- mailto link not working HOT 3
- Can't make it work in heroku HOT 2
- Internal Links are parsed out for src and href
- Please, write some tutor in README.rb file, how to show html. HOT 1
- Problem with cache_classes = true
- Custom CSS within editor
- image upload don't show up HOT 1
- bypass HTML generator
- Sass::SyntaxError HOT 3
- gemspec is not vaild HOT 3
- Undefined mixin 'box-shadow' HOT 9
- CORS error "Response for preflight is invalid (redirect)" HOT 7
- Pasting HTML into editor HOT 2
- Issue with Strong Parameters?? HOT 6
- Weak documentation
- Not working with nested attributes
- Undefined mixin 'box-shadow'. HOT 1
- Uncaught ReferenceError: JST is not defined
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from active_admin_editor.