Posted by bennos on August 28, 2010 at 10:32am
21 followers
| Project: | @font-your-face |
| Version: | 7.x-2.x-dev |
| Component: | Code (general) |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
after first test, I can say, the module is great.
Can I use it with an Editor like CKEitor or TinyMCE?
Actually no. I have not found it, this is the feature request for it.
Comments
#1
I'd love to do this. I'll have to look at how font selection works with the WYSIWYG module and see if it's possible and what it would take.
#2
Now that 2.x is working, I'm moving all 1.x issues there.
#3
Trying this in D7 first.
#4
The attached file is a submodule to expose @font-your-face fonts to the WYSIWYG API. It's mostly functional (though ugly), but has one major problem: the WYSIWYG iframe doesn't use the preprocess system to determine CSS, so fonts don't actually get loaded in the WYSIWYG. The fonts work fine after the content is saved, but being able to see the results of edits in the editor is kind of the whole point of WYSIWYG. It's not even worth doing if that problem can't be solved.
Hopefully there's a solution to this problem, but I don't currently see any way to load more than one CSS file, nor external CSS in the WYSIWYG iframe.
I've been using TinyMCE in testing, have no idea yet how this works in other editors.
#5
I opened an issue in the WYSIWYG queue that will make this possible in D7, along with some changes to fontyourface_add_css_in_preprocess(): #1048300: Handle external CSS in wysiwyg_get_css()
Still not sure if this will ever work in D6.
#6
I just bumped that WYSIWYG issue. Not sure if that will help at all.
#7
This should happen in 7.x-2.x now.
#8
I installed 7.x-2.0 and I still don't see my web fonts appear in CKEditor.
I also tried 7.x-2.x and I don't see it with that one either. Am I missing a setting?
#9
Jesmaster, that functionality isn't complete yet. This issue is marked as "postponed" because we're waiting on something to complete it. If you read this thread and still thought it was complete, let me know how I can make that clearer. If you didn't read this thread before asking your question, you should start reading the thread first to save yourself (and others) some time.
#10
I read the thread.
I thought your post that said
meant the functionality was added in that version.
#11
Ah, I can see how that would be confusing. No, I mean future work on this should happen in 7.x-2.x. Unfortunately that work can't happen until the WYSIWYG module is updated, so we're stuck waiting on that.
#12
Any movement on this? Your patch at http://drupal.org/node/1048300#comment-4045880 is marked "Reviewed and Tested". If I install that patch and your patch here at #4, will this feature work? I have had no success adding fonts manually in WYSIWYG (TinyMCE), and I have a client who insists on using a script font. This would be a really simple solution. Otherwise, I'll go back to banging my head against a brick wall and figure out how to add the font manually.
#13
Yeah, that patch has been RTBC for over a year. I haven't tested the code here or there on any of the updates since then. Back when I wrote it, the code here was a proof of concept and still needed some UI work. I probably won't do much more on it as long as we're waiting for that WYSIWYG patch to get in, since the code here is useless without that and I'm not really interested in trying to support a patched version of WYSIWYG.
#14
Understood.
#15
Sun is reporting that the patch will be rolled into dev in the next 12 hrs. That was last night http://drupal.org/node/1048300#comment-5927164
#16
Yeah, I talked to sun in IRC today. I should have done that months ago. I'll try to get this working soon with the WYSIWYG dev.
#17
Awesome, thank you for the hard work! I imagine this will be useful to a lot of people.
#18
I just committed an initial version of this. Still needs some work, but my intent is to get this done before the next release and I wanted to get it in Git in case anyone else wants to help with that. Specifically, what I know still needs to be done:
1. Font CSS should load within the WYSIWYG preview, so you actually see the font while you're typing.
2. Button image needs to be improved. It's currently too big, so you only see part of the @ character.
3. List of fonts should go away when clicking somewhere outside the list.
And some nice-to-have improvements:
1. Button seems to get stuck in active state for some reason.
2. It would be nice to add some text next to the button, or generally make it work like the default font option works. Not sure if that's possible via WYSIWYG plugins.
#19
Congratulations! Going to take a look at it tomorrow, don't know yet if I'll be able to help anything (js still isn't my strong suit).
On a side note, probably because of all the time it took to develop this, there are CVS tags all over the place (
fontyourface_wysiwyg.info,fontyourface_wysiwyg.module,plugins/fontyourface.inc).#20
wow, really old issue. will have a look at your work.
#21
I can't get enabled fonts to load in WYSIWYG CKEditor, list just says NONE.
EDIT: Weird, works fine on my other sites.
#22
For me the button appeared in WYSIWYG CKEditor but did not display the fonts menu as it was looking for the wrong DOM element class. Once I fixed that I still couldn't see the menu until I raised its z-index. Attached is a patch for both issues.
#23
The last submitted patch, 896024-fontyourface-wysiwyg-button.patch, failed testing.
#24
rerolled patch