Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to add more settings (content_css, external_plugins, etc) #3

Open
orjanb-ne opened this issue Jun 28, 2021 · 2 comments
Open
Labels

Comments

@orjanb-ne
Copy link

I've been trying to add more settings to the TinyMCE editor, but without success. The Extension is not recognizing my parameters.

Here is my code:
`var p = tweak(api.parameters.instance.plugins);
var tb = tweak(api.parameters.instance.toolbar);
var mb = tweak(api.parameters.instance.menubar);
var sf = tweak(api.parameters.instance.style_formats);
var ep = tweak(api.parameters.instance.external_plugins);
var cc = tweak(api.parameters.instance.content_css);
var vb = tweak(api.parameters.instance.visualblocks_default_state);
var ec = tweak(api.parameters.instance.end_container_on_empty_block);

api.window.startAutoResizer();

tinymce.init({
  selector: "#editor",
  plugins: p,
  toolbar: tb,
  menubar: mb,
  style_formats: sf,
  external_plugins: ep,
  content_css: cc,
  visualblocks_default_state: vb,
  end_container_on_empty_block: ec,`

I've tried to add the external plugin (and content_css) in my forked repo and then pointing directly to that file, but TinyMCE isn't even trying to load that URL on init.

Here are my settings:

"toolbar": "undo redo | removeformat | tiny_mce_wiris_formulaEditor | help", "menubar": "edit insert", "external_plugins": { "tiny_mce_wiris": "URL to plugin" }

@exalate-issue-sync
Copy link

Ref: INT-2593

@jscasca
Copy link

jscasca commented Jul 12, 2021

Hey @orjanb-ne

I don't think using the tweak function there would work for external plugins since you will return an string and the configuration takes an object. You would probably need to parse that as a JSON string instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants