mukhortov / hesh-wordpress-plugin Goto Github PK
View Code? Open in Web Editor NEWWordPress plugin that adds syntax highlighting to the Post/Page HTML editor
WordPress plugin that adds syntax highlighting to the Post/Page HTML editor
I have a few custom wp editors on post/page editor admin pages and would like these to also use syntax highlighting.
Is there a means to do this already with the plugin or a way to do it manually in the meantime?
Shift+Ctrl is the standard command inside the editor, The issue is that when RTL lang and LTR lang are getting mixed inside the editor, There is a serious issue that the lines which contain them will be difficult to highlight and select and sometimes impossible.
Heya,
A few of us have left comments on your Wordpress support thread but the latest version has introduced a couple of bugs, one which makes using your plugin very difficult.
As I don't have 1.6.9 backed up I'll have to deactivate your plugin, but as one of my sites is a code tutorial site I would appreciate (1) being fixed, please.
Thanks so much,
Martin
First, thank for this great plug-in
In all the themes i tried, the "selected" area is barely seen. This makes the usage of "copy" & "paste" very problematic. Thanks.
I'm getting this error on both the theme and plugin editor screens. The plugin is working great in the page editors, though! I can't pinpoint the line the error is coming from because it's minified.
Is there any plan to support carbonfields?
After pressing the Add New
button at the top of the post/page editor, don't give CodeMirror focus on initialization
Add support for CodeMirror's different available keymaps.
Add an option to configure in the advanced panel.
Create custom implementation of comment/comment.js
using Ctrl+/
/ Cmd+/
Add an option to turn it on and off?
I really like this plugin but it would be even more useful if you could add highlightling for shortcodes. There are projects where I'm using much more shortcodes then hand written html.
Option not to strip <p>
and <br/>
tags when switching from HTML to visual editor.
Just like in TinyMCE Advanced options.
Your plugin is great! Could you please add support for Emmet.
HESH 2.0.1 works great with post/page editors, but in theme/plugin editors generates an error in WWW console:
TypeError: e.getElementById(…) is null > hesh.min.js:8:28029
HESH error on theme/plugin editors
There is no error in HESH 2.0
Switching from visual to text mode doesn't maintain scroll position due to CodeMirror re-initializing.
Solution: Save the cursor position and restore to that?
what should the esc
key do
How can I help debug this?
Support some weird method from the Code Snippets CPT Plugin.
How exactly? I still don't know.
This should copy the functionality from most other code editors.
Should be implemented as a CodeMirror Addon.
Thanks for this plugin! I love the syntax highlighting!
But unfortunately it conflicts with the Vamtam theme we are using. Vamtam themes add a their own visual editor tab. When I make changes there and update the page, those changes seem to overwritten by your editor in the text tab. Once I've disabled your plugin, everything works as expected.
Our theme isn't free, unfortunately, so you won't be able to check this, but I would imagine that other, free themes may add their own editor and that the same issue could happen there. Unless, of course, the theme is doing something wrong when the page is saved...
research this....
Create a theme based on each WP admin theme.
WP Auto
option in the themes to match the currently active admin theme.WP Auto
theme should be the default setting.WP Ectoplasm
etc.Options for and implementation of Addons:
selection/active-line.js
search/match-highlighter.js
edit/matchbrackets.js
edit/matchtags.js
edit/closetag.js
edit/closebrackets.js
fold/foldcode.js
fold/foldgutter.js
Ctrl+/
/ Cmd+/
- comment/comment.js
- #40scroll/simplescrollbars.js
- or use browser scrollbars?Will be cool to make this work inside SiteOrigin Editor Widget.
I think the monaco editor of VS code is the best code editor at the moment.
https://github.com/Microsoft/monaco-editor
Please consider using it.
A button that formats the entire page with tabs and the like.
Autoformat demo - this was discontinued, but might be usable
There is a Tidy
button on CodePen.io that does somthing similar. The CodePen editors are also an implementation of CodeMirror. How do they do it?
Win8.1, Firefox 52, Chrome 57, WP 4.7.3 w/plugs disabled.
Can't seem to get a background change on the active line in any of the themes.
Other than that, It Works Great!
line 43 of the .php file is causing pre v5.4 php to crash.
Its because of this, but it takes down the whole site, so we should push an update asap.
I committed it straight to master with no PR. sorry.
The options are saved are saved using Ajax every time any option is updated. Sometimes the connection fails and the option isn't saved. Some UI for some feedback from the saving process might be nice.
Add the search feature suite from the CodeMirror addons.
How to Search/Find with Ctrl/Cmd + F
Ctrl/Cmd + F
We are going to include some php snipets inside posts and this could be great!
Awesome plugin BTW,
Best regards
If I click "Add New" for a post or page and the if last time I was in "Text" or Code mode the editor tries to default into "Text" mode instead of Visual. Problem is the screen doesn't display the code windows area thing.... yeah bad description I know.
Might just be my install... can you replicate?
Hello, when inserting an image with wordpress wysiwig, an error happens and no image displayed.
Problem can be seen in console.
Wordpress version 4.7.1 Browser Chrome MacOS
I really like this plugin, however the new search feature not as good as Chrome's search. Is there a way to disable the HESH search feature? What about making it optional via a setting?
When do you plan to allow Codemirror add-ons like Tag Matcher?
https://codemirror.net/demo/matchtags.html
How can I include it on my own right now?
Thank you!
QTags.insertContent( text )
- #27Please reply with more suggestions
similar to the <!--more-->
tag.
I am the developer of GitHub Updater and I see you have added support to this plugin. There is, however, a problem. It is characterized in the more recent comments to this issue, afragen/git-updater#581 (comment)
The problem arises in that the repository name HESH-WordPress-Plugin
and dot org’s slug html-editor-syntax-highlighter
are not identical. As such, when the plugin is installed via dot org it is placed in a directory wp-content/plugins/html-editor-syntax-highlighter
, if it is ever updated using GitHub Updater this will be renamed according to the repository name, wp-content/plugins/HESH-WordPress-Plugin
and will never be updatable from dot org again.
My suggestion would be to rename the repository here to match the dot org slug. LMK if you have any questions or issues I can help with.
Also, branch headers are no longer required as the branch is set during an installation via GitHub Updater or during a branch switch.
Peter,
There were some more bugs. Can you do another patch release? v1.7.2
? Sorry they came a day too late for the other patch.
Thanks,
-James
Is there a reason the content resize handle has been removed?
If I remove this style it works just fine.
hesh.min.js is loaded on all edit/post screens, even when no editor is present. This causes hesh.min.js to fail as it expects an editor element.
In is_editor(), use post_type_supports($post,'editor') to check if the editor is present.
http://codex.wordpress.org/Function_Reference/post_type_supports
Also, consider using admin_enqueue_scripts to load your scripts and styles instead of injecting them "manually".
Many developers use Advanced Custom Fields to manage themes. Advanced custom fields has a WYSIWYG field that creates one identical to the default editor. The fix would be fairly simple, rather then basing your script off of the ID wp-content-editor-container you can use the CLASS wp-editor-container. I would be happy to edit it myself but your min system makes it difficult.
When enabling the plugin, the height of the editor gets limited to a fixed value, so one has to scroll inside a box instead of the scrolling the whole page. For long posts this means most of the content is outside the visible scroll area and thus cannot be searched with in-page search functionality (ctrl/cmd + F).
Browser: Chrome 55.0
Wordpress: 4.5.4
HESH: 1.7.2
I'm not sure if this is a bug or if its intentional but after updating the plugin to 2.0 I see a scrollbar in the middle of the text editor.
It appears to be caused by overflow: scroll !important;
set on .CiodeMirror-Scroll in /wp-content/plugins/html-editor-syntax-highlighter/dist/hesh.css?ver=2.0.0
on line 213.
When I turn off the overflow scroll the text editor looks fine.
Emmet - архиважное и архиполезное дополнение для любого уважающего себя текстового редактора для разворачивания абривиатур. CodeMirror является таким, поэтому под него @sergeche (Сергей Чикуёнок, автор Emmet) сделал дополнение https://github.com/emmetio/codemirror и вторая версия https://github.com/emmetio/codemirror-plugin
This is where Internet Explorer bugs will be documented and never fixed
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.