The effect is as follows
This is the Code button that we added in ScribeFire, and clicking this button will appear
Enter the code directly in the Codehere.
View HTML
You can see that the <pre> tag has been added.
Here are the configuration instructions:
The configuration process references this article: Install the WordPress client ScribeFire under Linux CentOS and add the code highlighting feature
The first floor is reserved for the great God.
The great God says that ScribeFire's editor is the TINYMCE API, the result of the great God analysis above
So, in fact, our configuration work is for TINYMCE API
According to the Great God's article, first
CD ~/.config/google-chrome/default/extensions/
Open the ScribeFire plugin under Chrome, click F12, go to developer mode, and Ctrl+f, find chrome-extension
followed by a long string of characters corresponding to the ScribeFire folder, enter this folder
CD elkkomimknapgodalnkjeddkjnjkfmfp/
Edit Events.js File
Vim Events.js
Find Tinymce.init and add code as instructed in the diagram
Editor.addbutton (' _code ', { text: ' Code ', icon:false, onclick:function () { //Alerts the currently Selected contents tinyMCE.activeEditor.selection.setContent ("<pre>codeHere</pre>"); });
In order to better suit the highlight style of the blog park, you can do the following settings
Editor.addbutton (' _code ', { text: ' Code ', icon:false, onclick:function () { //Alerts the currently Selected contents tinyMCE.activeEditor.selection.setContent ("<pre class=\" brush:cpp;gutter:true;\ "> Codehere</pre> "); });
Save, then reopen ScribeFire to see our newly added button.
In edit view, add a border to the input code:
Enter in the current folder
Vim Skin/editor_content.css
Edit the Content.css file and add it at the end of the file
pre{ border:1px dashed #C1CDC1;}
Save
At this point, the configuration is complete! enjoy!
Use ScribeFire to insert syntax highlighting in your blog