Greetings!
First of all, well done with CK Editor! Love it! Very extensible, great documentation, great support, and effective.
So firebug doesn't work within the editor. Is that because it's an iFrame? When created via ajax anyway? Ok, I should specify. Right clicking to inspect an element doesn't work. I have to inspect an element outside, and within firebug dig into all the divs before I get to the content. Fun doing that 30 times in a row. At this rate, I'm about to write an autohoty to do it for me!
I have a bunch of pre-made templates that I'd like the users to be able to easily edit. I can apply the stylesheet beautifully, which gets background images as well. But I can't figure out how to make the images work with a relative URL. all the templates refer to images in the same subfolder ex. images/theimage.jpg Is it possible to implement images with a relative url? When I have javascript show me the document.location.href or window.location (I tried all of those types just in case) it just gave me about:blank.
Thank you!
And if you have the time and patience to read and respond to the next section, you freaking rock!
So thinking creatively.
If there is no way to access images with a relative url, is there a way to do a dynamic search and replace?
Ex. <img src="images/theimage.jpg" /> If I could do a search and replace and for
Find: src="images/
Replace: src="http://www.mydomain.com/templates/images/
Then put all the template images there. I don't know CKEditor well enough, and my js skills aren't that great, but if I were doing it on a regular page, I'd have a function grab the innerHTML of everything ( or sections at a time). Find substrings, replace appropriately, and paste it all back in.
That function could run that every time they went from the html to the visual. The images starting with http:// wouldn't fit the find criteria and wouldn't be replaced. How plausible is that?
If it is in any way realistic, where or how would I find how to get my function triggered when they switch panes, html and visual? And, what sections of code or plugins should I best work off of?
Thank you so so much! You guys rock, and again, thanks for this awesome tool!
Cheers!
David
Mon, 09/19/2011 - 03:55
#1