Just the styles; Header 1, Header 2,... ? I'm checking the Summernorte website but can not figure out how to implement the coding?

Code: Select all
'toolbar': [
['style', ['style', ]],
['font', ['fontname', 'fontsize', 'bold', 'italic', 'underline', 'clear', ]],
['color', ['forecolor', 'backcolor', ]],
['insert', ['link', 'picture', ]],
['misc', ['undo', 'redo', 'codeview', ]],
],
'fontNames': ['Raleway'],
'fontNamesIgnoreCheck': ['Raleway'],
'fontSizes': ['15'],
'fontSizesIgnoreCheck': ['15']
Code: Select all
'toolbar': [
['style', ['style',]],
['font', ['fontname', 'fontsize', 'bold', 'italic', 'strikethrough', 'clear',]],
['color', ['forecolor', 'backcolor', ]],
['para', ['ul', 'ol', 'height']],
['insert', ['link']],
['misc', ['picture', 'fullscreen', 'codeview', 'print', 'help', ]],
],
'fontNames': ['Spectral', 'Quicksand'],
'fontNamesIgnoreCheck': ['Spectral', 'Quicksand']
toolbar: [
// [groupName, [list of button]]
['style', ['style']],
['font', ['clear', 'fontname', 'fontsize', 'fontsizeunit' , 'forecolor' , 'backcolor' , 'strikethrough', 'superscript', 'subscript']],
['misc', ['undo', 'redo']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture', 'video', 'hr']],
['view', ['codeview', 'help']]
]
toolbar: [
// [groupName, [list of button]]
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']]
toolbar: [
['style', ['style']],
['font', ['clear', 'fontname', 'fontsize', 'fontsizeunit' , 'strikethrough', 'superscript', 'subscript']],
['misc', ['undo', 'redo']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture', 'video', 'hr']],
['view', ['codeview', 'help']],
toolbar: [
['style', ['style']],
['font', ['clear', 'fontname', 'fontsize', 'fontsizeunit' , 'forecolor' , 'backcolor' , 'strikethrough', 'superscript', 'subscript']],
['misc', ['undo', 'redo']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture', 'video', 'hr']],
['view', ['codeview', 'help']],
Hi again mixextra. Tnx for your help. I have started to figure out how to do some changes, the toolbar contains now the buttons/menus that I want... but I have not still managed to fill up the font menu with more fonts? For example I added one font "Merriweather" to the code you had... but clearly I am not implementing this in the right place and in the right way... please am greatful for advice.
Code: Select all
'fontNames': ['Spectral', 'Quicksand'], 'Merriweather'],
'fontNamesIgnoreCheck': ['Spectral', 'Quicksand'], 'Merriweather']
Code: Select all
toolbar: [
// [groupName, [list of button]]
['style', ['style']],
['font', ['clear', 'fontname', 'fontsize', 'fontsizeunit' , 'forecolor' , 'backcolor' , 'strikethrough', 'superscript', 'subscript']],
['misc', ['undo', 'redo']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']],
['table', ['table']],
['insert', ['link', 'picture', 'video', 'hr']],
['view', ['codeview', 'help']]
]
Code: Select all
toolbar: [
// [groupName, [list of button]]
['style', ['style']],
['font', ['clear', 'fontname', 'fontsize', 'fontsizeunit' , 'forecolor' , 'backcolor' , 'strikethrough', 'superscript', 'subscript']],
['misc', ['undo', 'redo']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']],
['table', ['table']],
['insert', ['link', 'picture', 'video', 'hr']],
['view', ['codeview', 'help']]
],
'fontNames': ['Spectral', 'Quicksand', 'Merriweather'],
'fontNamesIgnoreCheck': ['Spectral', 'Quicksand', 'Merriweather']
Hi mixextra... tnx a lot. That works. Just that the different styles ex italic, bold, bold italic etc doesnt work... And how do I know that the fonts I setup in the list works on the web? Shall I install this fonts as usual in wwb with the webfonts...?mixextra wrote: ↑Thu Aug 04, 2022 7:00 pm Hi Bluesman,
you can try for example like this:
Code: Select all
toolbar: [ // [groupName, [list of button]] ['style', ['style']], ['font', ['clear', 'fontname', 'fontsize', 'fontsizeunit' , 'forecolor' , 'backcolor' , 'strikethrough', 'superscript', 'subscript']], ['misc', ['undo', 'redo']], ['color', ['color']], ['para', ['ul', 'ol', 'paragraph']], ['height', ['height']], ['table', ['table']], ['insert', ['link', 'picture', 'video', 'hr']], ['view', ['codeview', 'help']] ], 'fontNames': ['Spectral', 'Quicksand', 'Merriweather'], 'fontNamesIgnoreCheck': ['Spectral', 'Quicksand', 'Merriweather']
with these options, you can precisely specify tools in cms for users to use during editing, so that they do not spoil the design of the page, such as fonts, font size, etc.
Tnx for your concern mixextramixextra wrote: ↑Thu Aug 04, 2022 8:44 pm Hi,
I don't know for sure, but I think that the editor itself does not add any font to the website that is not directly part of it.
If the chosen specific font is not part of the website, it will probably be replaced by a safe font.
Pablo could react to these connections as it is...
Off topic.......I had a problem with the white background of the Summernote editor on one of my pages. The page itself had a dark background style and the white font text was not visible when editing in cms. If you have the same problem, I have a solution to change the white background of Summernote to transparent, that means the editor inherits the background color from the cms element.
Buenos dias mixextra, yes that seams to work perfect... I don't get arround mine that is changing all the time...mixextra wrote: ↑Fri Aug 05, 2022 10:33 am HI,
do you want this kind of behavior? ... after logging in, open summernote, click in the text field and it will immediately display your font even after changing and saving ...
you can try to edit and save. don't forget to delete cookies
link: http://mixextra.sk/Test2/index.html
password: admin
Yes... pleasemixextra wrote: ↑Fri Aug 05, 2022 10:33 am HI,
do you want this kind of behavior? ... after logging in, open summernote, click in the text field and it will immediately display your font even after changing and saving ...
you can try to edit and save. don't forget to delete cookies
link: http://mixextra.sk/Test2/index.html
password: admin
Code: Select all
toolbar: [
// [groupName, [list of button]]
['style', ['style']],
['font', ['clear', 'fontname', 'fontsize', 'fontsizeunit' , 'forecolor' , 'backcolor' , 'strikethrough', 'superscript', 'subscript']],
['misc', ['undo', 'redo']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']],
['table', ['table']],
['insert', ['link', 'picture', 'video', 'hr']],
['view', ['codeview', 'help']]
],
'fontNames': ['Arial Regular', 'Arial Black', 'Times New Roman', 'Merriweather', 'Merriweather Sans'],
'fontNamesIgnoreCheck': ['Arial Regular', 'Arial Black', 'Times New Roman', 'Merriweather', 'Merriweather Sans']
Code: Select all
toolbar: [
// [groupName, [list of button]]
['style', ['style', 'clear']],
['font', ['fontname', 'fontsize', 'fontsizeunit' , 'height', 'bold', 'italic', 'forecolor' , 'backcolor' , 'underline', 'strikethrough', 'superscript', 'subscript']],
['misc', ['undo', 'redo']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture', 'video', 'hr']],
['view', ['codeview', 'help']]
],
'fontNames': ['Courier', 'Franklin Gothic', 'Fran', 'Georgia', 'Jost', 'Helvetica', 'Impact', 'Merriweather', 'Tahoma', 'Times', 'Verdana'],
'fontNamesIgnoreCheck': ['Courier', 'Franklin Gothic', 'Fran', 'Georgia', 'Jost', 'Helvetica', 'Impact', 'Merriweather', 'Tahoma', 'Times', 'Verdana'],
'lineHeights': ['0.2', '0.3', '0.4', '0.5', '0.6', '0.8', '1.0', '1.2', '1.4', '1.5', '2.0', '3.0'],
fontSizes: ['7', '8', '9', '10', '11', '12', '13', '14', '16', '18', '24', '36', '48' , '64', '82']
Hi mixextra, tnx for being back on this issuemixextra wrote: ↑Fri Aug 12, 2022 2:04 pm Hi Bluesman,
i made a test project it works like this:
http://mixextra.sk/Test3/index.html
try admin password: admin
If it is correct, I will send you the wbs project so that you can see the settings.
Hi mixextra, for sure getting closer. Almost all works.mixextra wrote: ↑Tue Aug 16, 2022 9:56 pm Hi Bluesman,
I think this could be what we are looking for:
http://mixextra.sk/Test3/index.html
admin password: admin
try changing the text, font, size,
also managed to solve the correct display of text formatting in the text-area summernote.
Bluesman, I will ask for feedback if the new solution is better than the last one.
Code: Select all
toolbar: [
// [groupName, [list of button]]
['style', ['style', 'clear']],
['font', ['fontname', 'fontsize', 'fontsizeunit' , 'height', 'bold', 'italic', 'forecolor' , 'backcolor' , 'underline', 'strikethrough', 'superscript', 'subscript']],
['misc', ['undo', 'redo']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture', 'video', 'hr']],
['view', ['codeview', 'help']]
],
'fontNames': ['Merriweather Sans Light', 'Krona One', 'Arial Black', 'Palatino', 'Gill Sans'],
'fontNamesIgnoreCheck': ['Merriweather Sans Light', 'Krona One', 'Arial Black', 'Palatino', 'Gill Sans'],
'lineHeights': ['0.2', '0.3', '0.4', '0.5', '0.6', '0.8', '1.0', '1.2', '1.4', '1.5', '2.0', '3.0'],
'fontSizes': ['7', '8', '9', '10', '11', '12', '13', '14', '16', '18', '24', '36', '48' , '64', '82']
Yes... this works good.mixextra wrote: ↑Sat Aug 20, 2022 2:03 pm Hi Bluesman,
project for requested fonts:
Arial
Arial Black
Jost Light
Jost Black
Merriweather Sans Light
Merriweather Sans ExtraBold
http://mixextra.sk/Test2/index.html
administrator password: admin
try changing the text, font, size.
I tested Firefox, Edge, Chrome, Android Internet, Android Chrome.
Hi mixextra... can be good if we have a communication outside the forum? And just publish the solutions here. If you direct me to a contact form or something so I can send to you... email etc. If you want you can contact me through my signature in this post were I have a contact form
I think there can be a difference because the CMS tools requires the MySQL database... (or thats what I'm using)
Good morning... I'm in Ecuador
That was better. The typefaces works also ok...? I am stunned. I checked your earlier settings and it seams to be same as mine when it comes to the fontlist. Do you have any other settings as CSS... I can not get it. Are the font installed on your server?mixextra wrote: ↑Mon Aug 22, 2022 12:41 pm Hi,
I hope it worked permission set to Ecuador (GeoIP - "EC").
http://mixextra.sk/Test4/index.html
click - "Administrator"
Username: none
Password: admin
clik - "Edit"
try the changes
clik - "Save"
edited content will appear on click - "Content"
(Alternatively, if you have an optional vpn, you can log in from a server from the countries of Slovakia (SK) or the Czech Republic (CZ), these are enabled by default by the provider.)
have a nice day
Code: Select all
<p><span style="font-family: "Jost Black"; font-size: 14px;">test</span><br></p>
Code: Select all
<p><span style="font-family: 'Jost Light'; font-size: 14px;">test</span><br></p>
Code: Select all
$content = isset($_POST['content']) ? $_POST['content'] : '';
Code: Select all
$content = str_replace('"', "'", $content);
Code: Select all
<link href="NameProject.css" rel="stylesheet">
Code: Select all
<link href="https://fonts.googleapis.com/css?family=Raleway:400&subset=latin-ext&display=swap" rel="stylesheet">
Hi again mixextra... happy fridaymixextra wrote: ↑Mon Aug 22, 2022 4:01 pm Hi Bluesman
he did a lot of tests before I was able to isolate the problem.enjoy the procedure:
This is the procedure that works for me with the SUMMERNOTE editor + the "CMS Admin" and "EditableContentAdmin" tools:
1.
Summernote generates """ characters when saving to the database. For example, we write the word "test" in the editor and select the font "Jost Black" and the size "14px".
summernote generates such code, which it writes to the database:and when retrieving the text from the database, it is not displayed correctly for the characters """Code: Select all
<p><span style="font-family: "Jost Black"; font-size: 14px;">test</span><br></p>
before saving to the database it is necessary to replace """ for "one quote" so that the resulting code is:I achieved this by adding "CMS Admin" or "EditableContentAdmin" to the php code after publishing to the server. Open "editablecontentadmin.php" or "cmsadmin.php" and find the line:Code: Select all
<p><span style="font-family: 'Jost Light'; font-size: 14px;">test</span><br></p>
add the code under this line:Code: Select all
$content = isset($_POST['content']) ? $_POST['content'] : '';
and save changes.Code: Select all
$content = str_replace('"', "'", $content);
Attention when publishing a new website to the server, it must be repeated!
2.
In the WWB project and in the "CMS Admin" or "EditableContentAdmin" element in the "Object Html/Before Tag" tab (CTR+H), it is necessary to complete the path for the used fonts, for example:(I use not googleFonts in this case and add fonts to the server manually via WWB)Code: Select all
<link href="NameProject.css" rel="stylesheet">
or(I use it for googleFonts)Code: Select all
<link href="https://fonts.googleapis.com/css?family=Raleway:400&subset=latin-ext&display=swap" rel="stylesheet">
I don't know why, but the summernote editor doesn't see the css style listed in the header of the website and it is necessary to add this path to "CMS Admin" or "EditableContentAdmin".
Always test on a device browser that does not have fonts installed in WIN or WWB
I'm not a programmer, I tested this procedure with mysql and json database. Works well and as expected.
Have a nice day.
Perhaps Pablo could advise:
1. how to add "$content = str_replace('"', "'", $content);" directly in WWB so that "editablecontentadmin.php" or "cmsadmin.php" does not have to be rewritten every time after publishing to the server.
2. why Summernote does not see the css style listed in the website header
Code: Select all
$content = str_replace('"', "'", $content);