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

Style is not applied to variables #27

Open
Misiu opened this issue Mar 23, 2017 · 1 comment
Open

Style is not applied to variables #27

Misiu opened this issue Mar 23, 2017 · 1 comment

Comments

@Misiu
Copy link

Misiu commented Mar 23, 2017

I've prepared simple demo to show this issue: https://codepen.io/Misiu/pen/vxjQow

I have simple html:

<h1 style="text-align: center;">Hi {{user_name}}, have a nice day!</h1>
<h5 style="text-align: center;">Note, this is not an "enterprise/premium" demo.<br />Visit the <a href="https://www.tinymce.com/pricing/#demo-enterprise">pricing page</a> to demo our premium plugins.</h5>

that is displayed in editor like this:
snap 2017-03-23 at 14 02 24

after applying style (bold) to whole line I get this output:

<h1 style="text-align: center;"><strong>Hi </strong>{{user_name}}<strong>, have a nice day!</strong></h1>
<h5 style="text-align: center;">Note, this is not an "enterprise/premium" demo.<br />Visit the <a href="https://www.tinymce.com/pricing/#demo-enterprise">pricing page</a> to demo our premium plugins.</h5>

and in preview looks like this:
snap 2017-03-23 at 14 04 57

Here is recording showing my steps:
variables_plugin_bug1

As You can see variable in output isn't bolded. Ideally variable should be treated as normal text.

@lashax
Copy link

lashax commented Jul 17, 2023

Try wrapping span element of the variable text in another element, like em. The span element is returned from function the createHTMLVariable inside plugin.js.

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

No branches or pull requests

2 participants