admin管理员组文章数量:1130349
I would like to apply minor styles main TEXTAREA forthe classic editor, for editing source directly. When I inspected the source, the top source listed was load_style.php and editor.min.css.
I was able to easily enough get past a smoke text for changes in ?editor.css? and editor.min.css, but editor.min.css has a warning that it's an autogenerated file, and not terribly long after, my changes were undone.
What file(s) can I change, or what else can / should I do, to style textarea.wp-editor-area#content?
I would like to apply minor styles main TEXTAREA forthe classic editor, for editing source directly. When I inspected the source, the top source listed was load_style.php and editor.min.css.
I was able to easily enough get past a smoke text for changes in ?editor.css? and editor.min.css, but editor.min.css has a warning that it's an autogenerated file, and not terribly long after, my changes were undone.
What file(s) can I change, or what else can / should I do, to style textarea.wp-editor-area#content?
1 Answer
Reset to default 0I think I am following your question.
You can enqueue a stylesheet only for the admin area and then add your styles to that. The following code will enqueue a stylesheet in a "css" folder in the root of your theme.
function my_admin_styles(){
wp_enqueue_style(
'admin_css',
get_stylesheet_directory_uri() . '/css/admin-styles.css', array(), filemtime( get_stylesheet_directory() . '/css/admin-styles.css')
);
}
add_action('admin_enqueue_scripts', 'my_admin_styles');
All you need to do is create a css directory in your themes root, add a file called admin-styles.css and add your styles to that.
I would like to apply minor styles main TEXTAREA forthe classic editor, for editing source directly. When I inspected the source, the top source listed was load_style.php and editor.min.css.
I was able to easily enough get past a smoke text for changes in ?editor.css? and editor.min.css, but editor.min.css has a warning that it's an autogenerated file, and not terribly long after, my changes were undone.
What file(s) can I change, or what else can / should I do, to style textarea.wp-editor-area#content?
I would like to apply minor styles main TEXTAREA forthe classic editor, for editing source directly. When I inspected the source, the top source listed was load_style.php and editor.min.css.
I was able to easily enough get past a smoke text for changes in ?editor.css? and editor.min.css, but editor.min.css has a warning that it's an autogenerated file, and not terribly long after, my changes were undone.
What file(s) can I change, or what else can / should I do, to style textarea.wp-editor-area#content?
1 Answer
Reset to default 0I think I am following your question.
You can enqueue a stylesheet only for the admin area and then add your styles to that. The following code will enqueue a stylesheet in a "css" folder in the root of your theme.
function my_admin_styles(){
wp_enqueue_style(
'admin_css',
get_stylesheet_directory_uri() . '/css/admin-styles.css', array(), filemtime( get_stylesheet_directory() . '/css/admin-styles.css')
);
}
add_action('admin_enqueue_scripts', 'my_admin_styles');
All you need to do is create a css directory in your themes root, add a file called admin-styles.css and add your styles to that.
本文标签: How can I (for the long term) style the classic editor39s TEXTAREA
版权声明:本文标题:How can I (for the long term) style the classic editor's TEXTAREA? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749043725a2307537.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论