Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Nov 27, 2012

Here's a go at a bbPress compatible version. Developed using WordPress 3.5-RC1-22852 and bbPress 2.2.2 It's working well on both front-end and admin editing using tinymce.

Bugs still present:

Issue One: tinymce's valid_children config does not allow for the pre element to contain block level elements.

Example: an html shotcode block with an h1 after save will have opening and closing pre tags injected by tinymce

Possible Solution: filtering tiny_mce_before_init on my install to allow the invalid xhtml nesting

Issue Two: Relating to the inclusion of an h1 tag in the example given above. In the admin or front-end editor and upon reload after save/edit the h1 will be styled as an h1 not as pre. This will usually go away after switching between the visual and html tabs and back again. I'm not sure if the browser is choking on the invalid nesting of pre or it's a tinymce bug.

Possible Solution: a pre parented css reset injected as the editor style may work

Gene Robinson added 3 commits November 27, 2012 12:35
When bbPress tinymce editor is used on the front-end, the html tab
needs decoding even when initially opened to the "visual" tab.
Avoiding extra formatting since bbPress it's content through
wptexturize. Probably not a bad idea overall to exempt the shortcodes
regardless of bbPress being active.
@Viper007Bond
Copy link
Contributor

I wasn't aware of no_texturize_shortcodes. Nice.

I'll check out the whole commit and get back to you. Thanks!

Gene Robinson added 2 commits November 30, 2012 03:39
Removed function: break_tinymce_cache() the hook it was loaded into had
been deprecated. A query string can be added to the external plugin
script uri if desired. Someone else can decide if that is still
necessary.

New function: force_bbp_tiny_editor() forces bbpress to use the tiny
not its current default teeny editor. The teeny wont load external
plugins.

New function: function tinymce_before_init() filtering tinymce so it
doesn't mangle code by stripping class attributes and injecting rogue
pre tags.

Added support for WP post revisions and WP trash & bbPress' front-end
quicksave AJAX requests

This commit needs more testing but I think it's buttoned down for the
most part.
Improved support for WP post revisions, WP trash & bbPress
quicksave/adminlinks ( merge split trash )

New function: force_bbp_tiny_editor() Will force bbpress to use the
tiny editor not its current default the teeny editor. The teeny one
wont load external plugins.

New function: function tinymce_before_init() filtering tinymce so taht
it doesn't mangle code by stripping class attributes and injecting
rogue pre tags.

Added support for WP post revisions, WP trash & bbPress
quicksave/adminlinks ( merge split trash )
@Viper007Bond
Copy link
Contributor

Closing in favor of a fresher pull request: #7

LoveMHz pushed a commit to LoveMHz/SyntaxHighlighter that referenced this pull request Oct 8, 2019
Add missing css keywords / values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant