I show in my documentation how to use the plugins shortcodes. I work with the default block editor and I get annoyed every time the block is rendered incorrectly, because I forgot to write it in [prismatic_code][/prismatic_code]
tags. So I wrote a function that prevents this. Maybe you could include it in the plugin or put it in the FAQ.
add_filter(
'render_block',
function ( $block_content, $block ) {
if ( $block['blockName'] === 'prismatic/blocks' ) {
if (strpos($block['innerHTML'], 'prismatic_code') === false) {
return str_replace("[","[",$block['innerHTML']);
}
}
return $block_content;
},
10,
2
);
Edit: The replaced character should be & # 0 9 1 ;
without spaces.
I have a documentation for my plugin. I would like to point out a few important words, for example "property"
(red color) and "blue"
(blue color) on the page I need help with. I solved this with <pre><code>...<span style="color: #d63638">property</span>... <span style="color: #4f94d4">blue</span></code></pre>
. But I would like to show this in prismatic style. Is this possible? It doesn’t have to be colors, but bold, cursive or similar would also be fine. Or any other idea.
Thank you very much.
]]>I’m using the classic editor without blocks / Gutenberg.
Primatic works great! All my code is highlighted perfectly.
But the Highlight CSS and JS are loaded on posts which don’t have any <code>
or <pre>
elements.
Is there a way to make it load selectively?
Thanks!
]]>Hey
Just a heads up. Editing existing code snippets in WP 6.5 beta 3 or the current Gutenberg Plugin version, appears to replace newlines with br tags, and escape other html entities. Resulting in formatted code like this:
… looking like this:
Issue created on Github:
https://github.com/WordPress/gutenberg/issues/59548
I’m using Prism.JS for my code highlighting, but just verified that the same issue occurs with the Prismatic plugin.
It’s important to note, that these changes to the content of your code block, are made when you edit the blocks. So just updating to WP 6.5 will not trigger the issue. You must edit and save a code block first.
Is this something you can reproduce? I noticed you’ve tested with WP 6.5 beta. If so, please pitch in. It seems like this change is intentional.
]]>Hi Jeff,
Can you please give us a on/off switch for line numbers?
Right now, we have to:
1. Sselect the prismatic block
2. Expand “Advanced”
3. Fill in “line-numbers”
As you can see, it takes many clicks. We have posts with sometimes 10 blocks with line numbers.
A on/off button under the Prismatic sidebar menu would be great.
See example:
Thanks.
]]>Hi Jeff,
I can see that you added in V2.6:
Adds option to disable the Prismatic block stylesheet
So I did disable it, and it doesn’t load anymore. But will this cause any harm for the front-end?
When I look at the file, it’s this:
/* Prismatic - Block Styles */
.block-editor .block-editor-plain-text.wp-block-prismatic-blocks[style] {
padding: 20px; line-height: 22px; font-size: 14px; font-family: Menlo, Consolas, Monaco, monospace;
white-space: pre; resize: vertical !important; overflow-x: auto !important; overflow-y: hidden !important;
-webkit-hyphens: none; -moz-hyphens: none; -ms-hyphens: none; hyphens: none;
-moz-tab-size: 4; -o-tab-size: 4; tab-size: 4;
-ms-word-break: normal; word-break: normal;
-webkit-overflow-scrolling: touch;
}
Hopefully you can tell me what it does, or if it’s okay to disable it, or what we should test after we disable it.
Thanks!
]]>I’ve noticed an interesting discrepancy between Prismatic vs vanilla WordPress behavior: if I add a new page, Option (kebab menu) > Code editor and paste the following raw HTML:
I use?<code><a >perl -ne</a></code> one-liners every day.
and view the page with Prismatic deactivated, it renders as a hyperlink with monospaced link text, like this:
I use?perl -ne
one-liners every day.
However, when I activate Prismatic (even with Settings > Prismatic > General : Library = None) and view the same page again, it instead renders the HTML markup for the hyperlink, like this:
I use?<a >perl -ne</a>
one-liners every day.
(which is not what I want — if I did want that, I would paste my markup into the Visual editor, which would take care of HTML-escaping it with e.g. <
behind the scenes so it’s syntactically just text content for the code element)
The test case above implicitly involves a Classic block, and one might argue that when dealing with Classic blocks it’s my responsibility to invert those tags (placing code
inside of a
instead of outside) and then everything would be fine. However, it’s also pretty easy to fall into this same trap writing new content using the WP block editor: if I type
I use perl -ne one-liners every day.
into a paragraph block, then put backticks around the perl -ne
bit to make it inline code, then select just that bit with my mouse and click the Link button (and supply a URL) to make it a hyperlink, I end up with the same constellation of underlying tags — a
inside of code
— which looks fine in the block editor but not when viewing the page with Prismatic activated. The raw HTML in this case ends up as:
<!-- wp:paragraph -->
<p>I use <code><a data-type="link" data-id="https://perldoc.perl.org/perlrun">perl -ne</a></code> one-liners every day.</p>
<!-- /wp:paragraph -->
As a sort of cherry on top, I note that the WP block editor is also perfectly happy to let me select and hyperlink only part of the contents of the code tag (e.g. just the rl
) in which case there’s no question of being able to solve it by inverting the tags.
Thanks in advance for considering what I suspect may be a rather thorny issue…
]]>I just discovered Prismatic and it looks very promising, but on some pages I’m seeing an error which appears to be some interaction between it and TOC+. Steps to reproduce in my environment (hopefully this will also reproduce on a clean default install, if not let me know and I will dig deeper):
[toc]
<pre><code class="language-perl">print 1+1;</code></pre>
[17-Jan-2024 21:07:36 UTC] PHP Fatal error: Cannot redeclare prismatic_highlight_inline_js() (previously declared in /home/dmrz/public_html/sandbox/wp-content/plugins/prismatic/inc/resources-enqueue.php:235) in /home/dmrz/public_html/sandbox/wp-content/plugins/prismatic/inc/resources-enqueue.php on line 232
[17-Jan-2024 21:10:26 UTC] PHP Fatal error: Cannot redeclare prismatic_prism_inline_js() (previously declared in /home/dmrz/public_html/sandbox/wp-content/plugins/prismatic/inc/resources-enqueue.php:180) in /home/dmrz/public_html/sandbox/wp-content/plugins/prismatic/inc/resources-enqueue.php on line 177
class
, or if I don’t include the [toc]
shortcode, or if I disable the TOC+ plugin.Hello Jeff. Thanks for a very useful plugin.
I am trying to use Fira Code for its very helpful ligatures. I have correctly linked to the Google Fonts, and can get inline code to use Fira Code via CSS code {}
. There is something inside Prismatic, however, that overrides the font choice. Could you suggest a way to turn off the Prismatic font override, so the Fira Code settings can percolate to Prismatic blocks?
Hi,
Thanks for the providing this great plugin and its working without any issue. I am using Learndash for some part of my site and it seems that Prismatic is not loading there (specific to their quiz section). I have already disabled the Limit to Posts option but still this is not loading. It seems that the js and css files are not even included on these section however the css and js of my other plugin are available on these pages except Prismatic
I checked other sections and its working fine. Not sure if the plugin is only working on specific post/page type of something in the Learndash is creating this issue
]]>Yes, the CSS is small. But it loads on everypage, in the footer, even on pages without the widget.
]]>Any Idea on how to normalize the whitespace with the plugin?
]]>Hi there!
How can we add prism themes found over here:
https://github.com/PrismJS/prism-themes
I tried without luck.
Here is is an example of the theme:
https://github.com/PrismJS/prism-themes/blob/master/themes/prism-coldark-cold.css
Thank you.
]]>Hi everybody,
the plugin works great, so thanks in advance.
But I still have a question: The plugin supports a lot of languages, but I can’t find TypoScript, although the language is supported by PRISM.
I can enter “language-typoscript” as an additional CSS class, the block is also titled accordingly in the frontend, but unfortunately without code highlighting.
Does anyone have any ideas?
]]>Hi,
Is it possible to add <datalist> for Gutenberg editor’s language selection dropdown list? I believe it would be much more convenient. (It’s really annoying to carefully find and select destination languages when adding a lot of Prismatic blocks).
Thank you:)
I can get line numbering to work on a code block by adding line-numbers
in the Advanced->Additional Class box. Is there a way to change the starting line counter to a value different from the default 1? Adding another class element data-start="10"
(as suggested here) does not work.
Thanks!
]]>Hello Team,
I am getting this message in my website under Console section of the browser from highlight-core.js:107
Deprecated as of 10.6.0. initHighlightingOnLoad() deprecated. Use highlightAll() now.
Would that need any changes? Currently we are relying on init function to call the main block but may now that has changed?
]]>Hi, is it possible to make the plugin work at the frontend editor. Works great the backend but looking for the possibility for making it work at the frontend for a QnA site. Thanks
]]>The YAML syntax highlighting looks wonky in a few places (see attached link); for example, numbers in line #25, 29 and 43 are inconsistently highlighted, as is the property value WordPress:
in line #53. Switching themes did not make any difference. Any help is appreciated.
Thanks.
]]>Hello Jeff,
Fantastic plugin! Just figured out how to create a command line block. Is there a way to disable the Copy button in this block?
Thanks!
]]>Since I updated to version 3.2 HTML markup seems not to be working anymore with prismjs, all the HTML code stays white. Going back to version 3.1.1 fixes this problem.
]]>Hello,
I have been getting this message from WordPress
Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
In this case, WordPress caught an error with one of your plugins, Prismatic.
I enabled debug log and following the trace output:
[14-Jul-2022 03:29:49 UTC] PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'iks_menu_fs_uninstall_cleanup' not found or invalid function name in /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php on line 307
[14-Jul-2022 11:38:47 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 11:51:47 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 11:52:37 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 11:52:44 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 16:14:41 UTC] PHP Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/ivrj9qv/public_html/wp-content/plugins/prismatic/inc/resources-enqueue.php:13
Stack trace:
#0 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(307): prismatic_enqueue('')
#1 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#2 /home/ivrj9qv/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#3 /home/ivrj9qv/public_html/wp-includes/script-loader.php(2156): do_action('wp_enqueue_scri...')
#4 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(307): wp_enqueue_scripts('')
#5 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#6 /home/ivrj9qv/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#7 /home/ivrj9qv/public_html/wp-includes/general-template.php(3042): do_action('wp_head')
#8 /home/ivrj9qv/public_html/wp-content/themes/generatepress/header.php(17): wp_head()
#9 /home/ivrj9qv/public_html/wp-includes in /home/ivrj9qv/public_html/wp-content/plugins/prismatic/inc/resources-enqueue.php on line 13
[14-Jul-2022 16:15:06 UTC] PHP Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/ivrj9qv/public_html/wp-content/plugins/prismatic/inc/resources-enqueue.php:13
Stack trace:
#0 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(307): prismatic_enqueue('')
#1 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#2 /home/ivrj9qv/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#3 /home/ivrj9qv/public_html/wp-includes/script-loader.php(2156): do_action('wp_enqueue_scri...')
#4 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(307): wp_enqueue_scripts('')
#5 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#6 /home/ivrj9qv/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#7 /home/ivrj9qv/public_html/wp-includes/general-template.php(3042): do_action('wp_head')
#8 /home/ivrj9qv/public_html/wp-content/themes/generatepress/header.php(17): wp_head()
#9 /home/ivrj9qv/public_html/wp-includes in /home/ivrj9qv/public_html/wp-content/plugins/prismatic/inc/resources-enqueue.php on line 13
[14-Jul-2022 16:19:26 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 16:19:33 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 16:19:38 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 16:19:42 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 16:19:48 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 16:19:53 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 16:19:59 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 16:20:09 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 16:20:31 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 16:21:11 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 16:21:18 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 16:22:44 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 18:58:58 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 18:59:18 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 18:59:34 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 19:00:25 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 19:01:04 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 19:01:11 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 19:01:39 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 19:01:45 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 19:04:42 UTC] PHP Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/ivrj9qv/public_html/wp-content/plugins/prismatic/inc/resources-enqueue.php:13
Stack trace:
#0 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(307): prismatic_enqueue('')
#1 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#2 /home/ivrj9qv/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#3 /home/ivrj9qv/public_html/wp-includes/script-loader.php(2156): do_action('wp_enqueue_scri...')
#4 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(307): wp_enqueue_scripts('')
#5 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#6 /home/ivrj9qv/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#7 /home/ivrj9qv/public_html/wp-includes/general-template.php(3042): do_action('wp_head')
#8 /home/ivrj9qv/public_html/wp-content/themes/generatepress/header.php(17): wp_head()
#9 /home/ivrj9qv/public_html/wp-includes in /home/ivrj9qv/public_html/wp-content/plugins/prismatic/inc/resources-enqueue.php on line 13
[14-Jul-2022 19:29:19 UTC] PHP Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/ivrj9qv/public_html/wp-content/plugins/prismatic/inc/resources-enqueue.php:13
Stack trace:
#0 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(307): prismatic_enqueue('')
#1 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#2 /home/ivrj9qv/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#3 /home/ivrj9qv/public_html/wp-includes/script-loader.php(2156): do_action('wp_enqueue_scri...')
#4 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(307): wp_enqueue_scripts('')
#5 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#6 /home/ivrj9qv/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#7 /home/ivrj9qv/public_html/wp-includes/general-template.php(3042): do_action('wp_head')
#8 /home/ivrj9qv/public_html/wp-content/themes/generatepress/header.php(17): wp_head()
#9 /home/ivrj9qv/public_html/wp-includes in /home/ivrj9qv/public_html/wp-content/plugins/prismatic/inc/resources-enqueue.php on line 13
[14-Jul-2022 19:29:41 UTC] PHP Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/ivrj9qv/public_html/wp-content/plugins/prismatic/inc/resources-enqueue.php:13
Stack trace:
#0 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(307): prismatic_enqueue('')
#1 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#2 /home/ivrj9qv/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#3 /home/ivrj9qv/public_html/wp-includes/script-loader.php(2156): do_action('wp_enqueue_scri...')
#4 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(307): wp_enqueue_scripts('')
#5 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#6 /home/ivrj9qv/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#7 /home/ivrj9qv/public_html/wp-includes/general-template.php(3042): do_action('wp_head')
#8 /home/ivrj9qv/public_html/wp-content/themes/generatepress/header.php(17): wp_head()
#9 /home/ivrj9qv/public_html/wp-includes in /home/ivrj9qv/public_html/wp-content/plugins/prismatic/inc/resources-enqueue.php on line 13
[14-Jul-2022 19:31:21 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 19:31:55 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 19:32:03 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 20:40:55 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 21:05:04 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 21:10:49 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 21:13:22 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 21:15:04 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 21:15:56 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[14-Jul-2022 21:48:17 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[15-Jul-2022 04:11:19 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[15-Jul-2022 04:11:31 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[15-Jul-2022 06:23:50 UTC] PHP Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/ivrj9qv/public_html/wp-content/plugins/prismatic/inc/resources-enqueue.php:13
Stack trace:
#0 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(307): prismatic_enqueue('')
#1 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#2 /home/ivrj9qv/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#3 /home/ivrj9qv/public_html/wp-includes/script-loader.php(2156): do_action('wp_enqueue_scri...')
#4 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(307): wp_enqueue_scripts('')
#5 /home/ivrj9qv/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#6 /home/ivrj9qv/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#7 /home/ivrj9qv/public_html/wp-includes/general-template.php(3042): do_action('wp_head')
#8 /home/ivrj9qv/public_html/wp-content/themes/generatepress/header.php(17): wp_head()
#9 /home/ivrj9qv/public_html/wp-includes in /home/ivrj9qv/public_html/wp-content/plugins/prismatic/inc/resources-enqueue.php on line 13
[15-Jul-2022 06:24:57 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[15-Jul-2022 06:25:00 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[15-Jul-2022 06:37:48 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[15-Jul-2022 06:37:53 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[15-Jul-2022 06:41:12 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[15-Jul-2022 06:41:16 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
[15-Jul-2022 06:41:24 UTC] PHP Notice: Undefined index: active in /home/ivrj9qv/public_html/wp-content/plugins/members/admin/class-notifications.php on line 414
]]>
Hello team,
*Feature request*
Currently I am using Highlight.js in the prismatic which comes with it’s own set of CSS designs.
It would be good it you can add one more option for end user to be able to add their own CSS file or class instead of using the default ones
]]>Hi!
We have a lot of blocks without a class that could help to detect language.
Just wp:code and it displays by default
Screenshot -> https://take.ms/IjN18
Example
Also, some blocks have that class. e.g. Screenshot -> https://take.ms/FzcKF
Example
Here it’s interesting Copy button appears (looks like prism.js functionality), but not highlighting.
Of course, if I put Prismatic block and define a lang – it all works.
My questions:
1. Is there a way to auto-detect the language? I read that highlight.js supports that but I didn’t manage to make it work with the plugin
2. Do you have a recipe for converting wp:code blocks to Prism blocks? Or maybe a feature? And of course, it makes sense (if no auto-detect) for blocks with a defined lang class. If no feature is planned/possible was thinking about writing a script (just need to debug it carefully ?? not to ruin content )
Many thanks for your work!
]]>Hi,
I have two possible suggestions about this plugin:
1. Is there a plaintext mode when choosing prismJS’s language? For now, the plugin-toolbar.js won’t enqueue when there’s no selected language, but sometimes plain-text mode with copy button is still useful.
2. (in prismJS) lang-php.js is smaller than official website’s download because it removes support for CSS and HTML, and the html/css part in php code won’t be rendered.
Thank you!
Hi Jeff,
Just to let you know that we are now on prism.js 1.28.0.
Can we see an update for prismatic with that version?
Thanks
]]>Hello,
When we add html into a prismatic block, and choose html, it displays as Markup, not html on the frontend. See the link in this post on our dev site that shows you what we are seeing. Since we need to choose the language to get the styling correct a fix would be great.
See screenshot https://dolbyiodev.wpengine.com/wp-content/uploads/2022/01/Screen-Shot-2022-01-25-at-12.26.37-PM.png
]]>Hi Jeff,
I updated to the latest version and there is one issue.
When I use the copy button, it shows upside down in PowerShell.
When I paste the code in notepad, everything looks good.
Something changed, because when I rollback to the previous version, it works as expected.
Thanks
]]>When pasting in code without using this block the code picks up the default gutenberg code block, and there is currently no way to convert (transform) that content to prismatic, which is possible with a click of the button for html or the current code block. Do you know anyway that this functionality could be enabled so that any gutenberg code blocks could be transformed to prismatic?
]]>Hello!
I’m trying to use Prismatic on my site but I can’t find a way to make it work properly.
I install the plugin, set-up options and then nothing happens.
Everything looks fine but in the front-end, code is the same.
I tried adding tags by myself (pre/code) and with a code block but nothing works.
Just saw I should use a prismatic code block but I can’t find it on gutenberg options. Only the normal code block.
I tried with other highlighting code plugins and they work, but I prefer prismatic results to be honest.
Any help?
Thanks in advance!
]]>