Stop Wordpress 3.9 From Removing Line Breaks - javascript

When im using the tinymce in wordpress, I like to use the visual editor to add color and font styles and things, and then sometimes I like to get right in there and do a little html editing so the post turns out out I like it. But I notice now that wordpress updated to tinymce 4.0 that every time I switch between the visual editor and the html editior my br tags are removed. I know theres lots of tips on how to fix this out there but I think they are meant for earlier versions on tinymc since none of them seem to work for me, even the plugins out there don't seem to work ...
Any Thoughts ?

Install ckeditor plugin for wordpress and then you can use source mode provided by ckeditor.

Related

TinyMCE paste plugin on IE 11 on paste, pasting %%MCEPASTEBIN%% instead of the actual text and getting stack overflown

I am using tinyMCE v5.5.1 with paste plugin v5.6.2. On pasting anything in the tinyMCE editor in IE11, it gets stack overflown and pastes %%MCEPASTEBIN%% until the browser stops responding. It works fine on Chrome, firefox etc.
There was already a github issue created for problem similar to this https://github.com/tinymce/tinymce/issues/4974 and the PR seems to have been merged but I'm still getting the same issue.
Without the paste plugin everything works fine, but I need the paste_postprocess functionality being provided by paste plugin.
Does anyone know how to fix it?
It is not supported to mix the core editor from one version (5.5.1) and a plugin from a different version (5.6.2). They are not tested in that fashion and there is no guarantee that they will ever work together in this fashion.
If you wish to use the paste plugin from 5.6.2 you need to update the entire editor to 5.6.2 not just one plugin.
If you test this on TinyMCE Fiddle using 5.6.2 in its entirety do you still get this issue?
I would also note TinyMCE is now at 5.7 so if you are doing an update it would make sense to move to the latest TinyMCE release.

How to add javascript to a joomla 1.5 article using TinyMCE editor?

I'm having trouble trying to get JavaScript to show up on a Joomla! article using the TinyMCE editor. I've set all the settings I should based on Google searches and it's still not showing. The JavaScript code is commented out as shown in screenshots below.
Any help is greatly appreciated. TQ!
Though many WYSIWYG editors claim <script> support, I would suggest using the "None" editor when adding the JavaScript code to your posts. I use Switch Editor to quickly change editors. After installing and activating the package:
Switch to "None" editor
Open the article
Add the embed code
Save the article
Switch back to your favorite WYSIWYG editor to edit other articles
This will give you the least problems. Unfortunately, the package is only available for Joomla! 2.5+. However, there is an alternative here:
http://www.joomler.net/download/81-joomla15-plugin/959-editor-switcher-for-joomla15-released.html
On a side note, you should upgrade your site away from Joomla! 1.5 ASAP!

CKEDITOR add plugin to source view

When using the find/replace plugin for ckeditor it is greyed out on the source view. To enable this I have found that you need to add:
modes: { wysiwyg:1, source:1 }
However, i wont lie, im pretty unsure where this should be placed.
It hopefully can be found in this link http://jsfiddle.net/SBmKz/ as it is 384 lines long.
I have tried researching this and have found a few examples of it in other plugins and also how it is done in the ckeditor.js (n.modes={wysiwyg:1,source:1}) but cant seem to get it to work within this plugin.
Many thanks
Find/replace option is created to work on DOM, not on a plain text. That's why it is disabled in source mode. Actually, it would be a completely new feature the find/replace in source mode - especially if it had to omit tags.

FontAwesome + IE7 + Dynamic Loading Content = Pain

I'm trying to use FontAwesome for some control icons on a jQuery lightbox plugin I've developed. For the life of me, and I can't get the icons to display in IE7. I followed the advised here to reload the IE7 stylesheet after the lightbox opens. However, where the icons should be, I just see their UTF numbers (e.g. 0xf024;). It's almost as if the output has been "escaped" somehow. Any help or ideas would be greatly appreciated.
Update:
I just discovered that this isn't just happening on dynamically loaded content. I'm seeing the same thing on any icon just loaded in the HTML.
Update 2:
I think the problem may be related to subsetting. I was using a subset of font-awesome, and when I tried just loading the complete package it worked. Now, I have to see what the difference is between the subset and the full package that's breaking it.
As indicated in the update above, the problem was with the subsetting of the font. The customized IE7 stylesheet for the subset had a few bugs. The problem came from the characters being referenced like this 0xf023; instead of like this . Once I made that correction, everything worked as expected.

Fast dynamic JavaScript WYSIWYG editor

Right now I am using the TinyMCE wysiwyg editor within my projects.
However there are some disadvantages with tinyMCE:
Tons of GET requests
Big
It is slow. I can't have a large number of TinyMCE editors at the same time. (Especially in IE)
Changing the DOM position of the TinyMCE caused issues where the listeners got lost.
Complicated to generate new TinyMCE editors dynamically during "runtime".
Hard to control by jQuery
Is there any WYSIWYG editor you would suggest?
A big plus would be a jQuery based editor as this project works with jQuery anyway.
You could try CKEditor http://ckeditor.com/blog/CKEditor_for_jQuery (formerly FCKeditor)
I'll suggest jHtmlArea, its jQuery powered and its quite fast
1 image file using CSS Image sprites
1 line of javascript, 1 line of CSS
I have used it in a lot of projects before and its quite good.
http://jhtmlarea.codeplex.com/
CKEditor is Slow!
If you need something as fast as possible, you could use http://unverse.net/Whizzywig-2011, but its ugly, so there is also something like http://aloha-editor.org/

Categories