pe:ckEditor -> Default font and wrap all <span to it?

Community Driven Extensions Project
rider
Posts: 497
Joined: 05 Mar 2010, 13:17

01 Sep 2020, 11:37

Hi all,

pe:ckEditor is a useful editor, thank you for add this to PF.

I have one query:
Currently if I add a text, but it will not create a <span>.......

If I add a font family to the text in the editor, then the HTML code will generated to:
<span style="font-family:Arial,Helvetica,sans-serif;">My Text</span>

Is there any possibility to create always the <span> to the HTML?

Because currently I have the issue, in the Editor it seems fine (from the layout, because the default from the editor.css is font-family:Arial,Helvetica,sans-serif, but if I´m open a <iframe and have a look for the preview, the font family is not the same. The same also, if I save the HTML code into the database and send it later to a client. The client will get the default font (Times New Roman).

Any ideas how this can be solved?

Many thanks
Primefaces 12.0, WildFly 21

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

01 Sep 2020, 13:11

PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

01 Sep 2020, 13:14

And here is how to set a custom config in CKEDITOR: viewtopic.php?t=20413
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

rider
Posts: 497
Joined: 05 Mar 2010, 13:17

01 Sep 2020, 13:37

Thank you, so you want to say:

1) I have to download the config.js and add this to my project?
2) Adjust the config.js (like in your mentioned links)
3) Add in the pe:ckEditor the path to the custom file?
----

Question:
- Which config.js should I use? The JS which I get from PFE from https://mvnrepository.com/artifact/org. ... itor/8.0.4 ?
Primefaces 12.0, WildFly 21

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

01 Sep 2020, 13:39

Yep use 8.0.4. and yes you can use example config.js and mess around with it.

Also I created this ticket just now: https://github.com/primefaces-extension ... issues/151

So this will be available to set in PFE 9.0 with font and fontsize attributes.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

rider
Posts: 497
Joined: 05 Mar 2010, 13:17

01 Sep 2020, 14:05

oh, great, Melloware...

Just to have a rough plan for me... when do you think PF9 / PFE9 will be go live?
Primefaces 12.0, WildFly 21

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

01 Sep 2020, 14:37

I don't work for PrimeTek but I heard October was the release date for 9.0 and I usually release PFE that same day.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

01 Sep 2020, 14:48

Actually read this post. Those 2 values only set the default.

https://stackoverflow.com/a/50907085/502366
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

03 Sep 2020, 14:06

So these default font settings definitely only set the Font Selector to those defaults. They don't automatically wrap your text in that span. I have seen a bunch of suggestions on Stack Overflow how to do what you want but they all seem like workarounds.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

rider
Posts: 497
Joined: 05 Mar 2010, 13:17

03 Sep 2020, 14:16

ok.... maybe I have to create a <div style="font-family="Verdana"> </div> before I init the String value and set it to this value?

What do you think?
Primefaces 12.0, WildFly 21

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 13 guests