-
AuthorPosts
-
March 13, 2016 at 11:03 am #835843
RedactiePartnersParticipantHello,
I have create a custom TinyMCE button that outputs some specific html markup inside the texteditor.
Yet this button is not shown in the Cornerstone text-editor. Now I presume it’s not the same TinyMCE editor. But is there a way to get my button to show inside the Cornerstone editor (especially the “text” element)
Thanks.
March 13, 2016 at 11:28 am #835862
RupokMemberHi there,
To prevent conflicts, Cornerstone disables all 3rd party extension to the WordPress TinyMCE setup. Regretfully, the visual editor was never meant to be used in a live environment, and it took a great deal of effort to provision it within the Cornerstone inspector. We’ve noticed that many TinyMCE extensions break the layout, and often cause fatal javascript errors, so we’ve disabled them by default. We don’t intend to provide native support for TinyMCE Advanced inside Cornerstone at this time. Plugin developers can use the
cornerstone_before_wp_editorto re-enable their extensions if they wish to provide support for Cornerstone.Hope this makes sense.
Cheers!
March 14, 2016 at 1:16 am #836581
RedactiePartnersParticipantAh this makes so much more sense now.
I understand the reasoning behind it. (The tinymce editor combined with WP likes to screw with the markup indeed)Thanks for pointing me to the correct action.
In that light and based on what is happening would you say it’s better to create my own range of shortcodes and add a button like the X/Cornerstone shortcodes button.
For this current case I could rewrite what I want into a shortcode, if that’s more reliable.March 14, 2016 at 1:23 am #836586
Rue NelModeratorHello There,
If it is really necessary then you may rewrite the shortcode. As that is all custom development, regretfully we won’t be able to assist further because custom development is outside the scope of our support. We’re happy to provide advice and get you started in the right direction, but you would still be responsible for the implementation.
Thank you for your understanding.
March 14, 2016 at 3:41 am #836649
RedactiePartnersParticipantI understand it’s custom development. And developing for Cornerstone isn’t really that difficult so far I love it.
The button is just one thing but I’m going with the flow. Besides it being custom development I am sure there is a best practice scenario from you guys.
Either way I can figure this out with the information you gave me! Thanks you!
March 14, 2016 at 4:04 am #836664
ZeshanMemberHi there,
We have a knowledge base article on the best practices of creating custom elements in Cornerstone; you may review this article: https://community.theme.co/kb/cornerstone-custom-elements/
To rewrite existing shortcodes, you may need to remove them using
remove_shortcode()function and then rewrite them in your child theme‘s functions.php file by making your own changes to the shortcode. You can find all shortcodes’ source files under /wp-content/plugins/cornerstone/includes/shortcodes/ directory.Thank you!
March 14, 2016 at 6:14 am #836768
RedactiePartnersParticipantSo I realise this might not be supported but do I do
add_action('cornerstone_before_wp_editor', 'my_function_here');and then inside that function I have my
add_filter( "mce_external_plugins", "add_js_plugin" );
add_filter( 'mce_buttons', 'add_button_function' );Can’t seem to get this to work but I’m probably using it wrong.
March 14, 2016 at 6:33 am #836792
ZeshanMemberHi there,
As this is a custom development, regretfully this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.
Thanks for understanding. Take care!
March 14, 2016 at 7:58 am #836898
RedactiePartnersParticipantI seriously can’t get this to work.
You even detach every button that is added to the editor (like the cornerstone shortcode button)
The thing is. We need some custom buttons over there otherwise cornerstone won’t be of much use to me.
And i’d like to be able to give my users the ease of cornerstone.Do you guys have a rate or price for custom development? Cause I’m really interested on how to implement this
cornerstone_before_wp_editorMarch 14, 2016 at 11:15 am #837187
JadeModeratorHi there,
As much as we want to help, I’m afraid we can’t give much assistance for custom development since implementing a new feature in Cornerstone would require codes to be customized that’s why we strongly recommend seeking help from a developer. Thanks for understanding.
March 14, 2016 at 12:17 pm #837279
RedactiePartnersParticipantI understand.
Also I figured it out. It was confusing because the moment you guys do the actiondo_action('cornerstone_before_wp_editor');then after then basically cornerstone overwrote the 3 tinymce toolbars again.
But after some creating use of functions I’ve been able to write my button to the cornerstone editor.Thanks for pointing me in the right direction and for putting up with me 🙂
March 14, 2016 at 1:52 pm #837409
JadeModeratorGlad to hear you got it sorted. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-835843 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
