Quote from: donshakespeare at Feb 15, 2017, 06:41 AMRE: firebot6
Thanks for using and the feedback.
My crystal ball is broken (cat broke it), so I can't really tell where the issue is, from where I am sitting.
But do paste me the plugin code you are using, and I will point out where the issue is.
Thanks for the help and the templates idea, I'll dig into that after I figure this out. I believe I tried your idea correctly, but with no luck, below are my chunks.
TinymceWrapperCommonCode (this is currently unchanged per your idea)
skin_url: MODx.config.assets_url+'components/tinymcewrapper/tinymceskins/modxPericles',
link_list:[
[[$TinymceWrapperLinkList]]
],
relative_urls: false,
remove_script_host: false,
document_base_url: MODx.config.site_url,
link_class_list: [
{title: 'None', value: ''},
{title: 'prettyLink', value: 'prettyLink'},
{title: 'colorBox', value: 'colorBox'}
],
image_class_list: [
{title: 'None', value: ''},
{title: 'prettyPhoto', value: 'prettyPhoto'},
{title: 'colorBox', value: 'colorBox'}
],
image_caption: true,
browser_spellcheck: true,
gecko_spellcheck: true,
paste_data_images: false,
menubar: false,
statusbar: false,
image_advtab: true,
setup: function(editor) {
editor.on('keydown', function(evt) {
if (evt.keyCode == 83 && evt.ctrlKey && !evt.shiftKey && !evt.altKey && !evt.metaKey) {//ctrl + s = save
evt.preventDefault();
$('#modx-abtn-save button').trigger("click");
}
if (evt.keyCode == 27) { //escape key = remove fullscreen
evt.preventDefault();
if ($('.mce-fullscreen').length) {
tinymce.activeEditor.execCommand("mceFullscreen")
}
}
});
editor.on("init",function() { //float fullscreen link
containerId = $(editor.getContainer()).attr("id");
$("#"+containerId+" .mce-i-fullscreen").parent().parent().parent().parent().css("float","right");
});
},
external_plugins:{
twAceEditor: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/twAceEditor.js",
// twCodeMirror: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/twCodeMirror.js",
// bubbleBar: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/tinymceBubbleBar.js",
// twExoticMarkdownEditor: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/twExoticMarkdownEditor.js",
modxMagicHoverLink: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/modxMagicHoverLink.js",
twPreCodeManager: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/twPreCodeManager.js"
},
file_browser_callback : autoFileBrowser,
//leave trailing comma
TinymceWrapperContent
tinymce.init({
selector: "#ta",
[[+commonTinyMCECode]]
statusbar: true,
plugins: "imagetools,autoresize,preview,paste,contextmenu,image,wordcount,fullscreen,code,charmap,searchreplace,textpattern,emoticons,insertdatetime,lists",
external_plugins: {
"example": "[[++assets_url]]components/tinymcewrapper/tinymceplugins/example.js"
},
//paste_word_valid_elements: "a,div,b,strong,i,em,h1,h2,h3,p,blockquote,ol,ul,pre",
//valid_elements: "iframe[*],object[*],audio[*],-span,a[href|target|class|rel|title|onclick],-strong,-b,-p[class<text-align-left?text-align-center?text-align-right],br,-h1,-h2,-h3,-figure,-figcaption,-img[!src|!alt],em,-blockquote,pre[class],-ol,-ul,-li,-code,hr[*]",
//valid_children: "figure[img|figcaption],-li[ul],-li[ol],-li[div],-strong[*],-em[*],-h1[*],-h2[*],-h3[*],-a[strong|em|h1|h2|h3|p|div],blockquote[p|ol|ul],pre,div",
resize: true,
autoresize_min_height: 100,
toolbar: "preview fullscreen | example undo redo | pastetext | lists | bold italic aligncenter | bullist numlist | link unlink | image | styleselect charmap searchreplace bubbleBarOptionsButton",
contextmenu: "code | twPreCodeManager | fullscreen | removeformat | link | image",
});
I don't know if it's related, but I'm getting this error in Modx as well:
[2017-02-16 20:02:40] (ERROR in modContext::makeUrl @ /home/site/public_html/core/model/modx/modcontext.class.php : 321) Resource with id 155 was not found in context mgr. (If it's not related, don't worry about it at the moment, everything seems to be working fine.)
The resource with id 155 is "tw_elfinder_browser".
Thanks for the help!