Jump to content

Weekly update – 28 October 2022 – TinyMCE Inputfield released


ryan

Recommended Posts

  • 2 weeks later...

@ryan I really like the implementation of the custom style formats!
One thing I noticed: If you insert a custom class for a link in the module settings, it will remove the class once the href attribute is set:

#Inline a.button { color: white; background-color: black; } /* Button */

I can select the new class in the dropdown, but once I add a href attribute with the link icon the class will be removed.

Link to comment
Share on other sites

Hey @ryan and others!

Playing around with TinyMCE again as it is really a great editor! I wonder how I can make it to only allow bold and nothing else?

--- update ---

This works visually:

{
  "menubar": false,
  "toolbar": "bold",
  "toolbar_sticky": false,
  "quickbars_selection_toolbar": "bold",
  "quickbars_insert_toolbar": "bold"
}

Ze16UDN.png IEDBs2B.png

--- /update ---

At first I thought it works because the toolbar shows only the "B" button, but the quickbars plugin shows too much options!

Another thing that I noticed: I opened the devtools and changed <p>Das ist ein Test</p> to <h1>Das ist ein Test</h1> and after save it was still an <h1> which is... less than ideal.

Does anybody know how I can prevent that from happening and how I can disallow everything but "B" in the quickbar?

Link to comment
Share on other sites

  • 3 weeks later...
On 12/28/2022 at 3:02 PM, jploch said:

@ryan I really like the implementation of the custom style formats!
One thing I noticed: If you insert a custom class for a link in the module settings, it will remove the class once the href attribute is set:

#Inline a.button { color: white; background-color: black; } /* Button */

I can select the new class in the dropdown, but once I add a href attribute with the link icon the class will be removed.

Does anybody know how we can insert buttons with custom classes in TinyMCE ??

That's a VERY common need, eg to add "uk-button-primary" to a link that was inserted via the TinyMCE field.

As @jploch mentioned the inline styles seem not to work on anchor tags 😞 

Link to comment
Share on other sites

  • ryan locked and unlocked this topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...